I have inetd configured via Cygwin on Windows and started as service.
The script:
use strict;
use warnings;
use IO::Socket;
use IO::Handle;
use IO::File;
use IO::Select;
print "input something\n";
STDOUT-> autoflush (1);
my $data = <STDIN> || die "(Failed reading STDIN) $^E (Error) $! (End)\n";
On command line:
telnet localhost <port>
It fails immediately with:
(Failed reading STDIN) The parameter is incorrect (Error) Bad file descriptor (End)
I have been searching for the whole google but couldn't find solution. Could anyone shed some lights on it?
Appreciated!
One thing I don't understand is, why STDIN is closed, do we have some way to debug? Thanks in advance!
It seems to be a bug with Cygwin & invoking Perl from ClearCase VOB. For future reference: I compiled perl in Cygwin and invoked it from the inetd script. Things are working fine as far as I can tell.