Running win32 applications under inetd

Ian Collins bagpuss@ihug.co.nz
Mon Dec 13 13:26:00 GMT 1999


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



More information about the Cygwin mailing list