This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Running win32 applications under inetd


I am using Sergeys inetd port to start a telnet session.

One of the applications I am running in the telnet session is a console
application compiled under Visual C++.
(Example source code follows).

When run in a telnet session, this code (using isatty) always reports
the terminal is non-interactive.
When run in a bash console session (with CYGWIN notty set), this
application works as expected (i.e, isatty says it is interactive).

Does anyone have any ideas on how to fix this?
Does it have something to do with the way the shell process is executed
from inetd (or telnetd)?

Example code:

=== snip ===

//
// Example code...
//
// (Note: vc++ uses _isatty rather than isatty).

#include "stdafx.h"
#include <stdio.h>
#include <io.h>

int main(int argc, char* argv[])
{
  int i;
  if ( _isatty(_fileno(stdin))) {
 printf("terminal is interactive\n");
  }
  else {
 printf("terminal is NON-interactive\n");
  }
  return 0;
}

=== snip ===

Regards,
Ian Collins



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]