GaijinPunch has asked for the wisdom of the Perl Monks concerning the following question:
Even if I sleep for 15, I still only get about half of the full output. If I don't issue the quit command, I get all the output, but of course, my script is stuck, as it will never leave the HIS_OUT loop.my $pid = open2(*HIS_OUT, *HIS_IN, "/my/application" ) || die $!; sleep 3; print HIS_IN "quit\n"; while ( <HIS_OUT> ) { chomp; &do_something_to($_); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question about IPC::Open2
by Tanktalus (Canon) on Nov 14, 2006 at 04:02 UTC | |
|
Re: Question about IPC::Open2
by sgifford (Prior) on Nov 14, 2006 at 07:50 UTC | |
|
Re: Question about IPC::Open2
by BUU (Prior) on Nov 14, 2006 at 02:26 UTC | |
by GaijinPunch (Pilgrim) on Nov 14, 2006 at 03:03 UTC | |
by BUU (Prior) on Nov 14, 2006 at 03:17 UTC | |
by GaijinPunch (Pilgrim) on Nov 14, 2006 at 04:05 UTC |