Home: Perl Programming Help: Win32 Programming Help:
Perl reading STDIN via inetd on windows error “Bad file descriptor”



dellair
New User

Jun 16, 2013, 8:01 AM


Views: 20046
Perl reading STDIN via inetd on windows error “Bad file descriptor”

I have inetd configured via Cygwin on Windows and started as service.

The script:########################STARTuse 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";########################END

On command line: telnet localhost

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!

PS: The script works with linux-like OS.