This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Running win32 applications under inetd
- To: gnu <cygwin at sourceware dot cygnus dot com>
- Subject: Running win32 applications under inetd
- From: Ian Collins <bagpuss at ihug dot co dot nz>
- Date: Tue, 14 Dec 1999 10:15:47 +1300
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