[英]Perl reading STDIN via inetd on windows error “Bad file descriptor”
我已經在Windows上通過Cygwin配置了inetd並作為服務啟動。
劇本:
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";
在命令行上:
telnet localhost <port>
它立即失敗並顯示:
(Failed reading STDIN) The parameter is incorrect (Error) Bad file descriptor (End)
我一直在搜索整個Google,但找不到解決方案。 有人可以給它開些燈嗎?
不勝感激!
我不明白的一件事是,為什么STDIN是關閉的,我們是否有某種調試方法? 提前致謝!
Cygwin和從ClearCase VOB調用Perl似乎是一個錯誤。 供以后參考:我在Cygwin中編譯了perl,並從inetd腳本中調用了它。 據我所知,一切工作正常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.