diff options
author | Stephen McCamant <smcc@mit.edu> | 2001-01-09 05:33:22 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-09 21:36:04 +0000 |
commit | d27127a1d94bb72eb9421f343c9c3c2c5ca60b5a (patch) | |
tree | 757d4bb82777f8204119c9ecaaf2d6448a5f05c1 /t/io/openpid.t | |
parent | 578130200aea30eb8391e4d2a8f7bc5df24d3c3a (diff) | |
download | perl-d27127a1d94bb72eb9421f343c9c3c2c5ca60b5a.tar.gz |
Remove FileHandle/IO dependence in t/io/openpid.t
Message-ID: <14939.33475.474459.147429@soda.csua.berkeley.edu>
p4raw-id: //depot/perl@8383
Diffstat (limited to 't/io/openpid.t')
-rwxr-xr-x | t/io/openpid.t | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/t/io/openpid.t b/t/io/openpid.t index 3871e0b4e4..7c04a29fe8 100755 --- a/t/io/openpid.t +++ b/t/io/openpid.t @@ -16,10 +16,8 @@ BEGIN { } } - -use FileHandle; use Config; -autoflush STDOUT 1; +$| = 1; $SIG{PIPE} = 'IGNORE'; print "1..10\n"; @@ -33,10 +31,8 @@ $perl = qq[$^X "-I../lib"]; # the other reader reads one line, waits a few seconds and then # exits to test the waitpid function. # -$cmd1 = qq/$perl -e "use FileHandle; autoflush STDOUT 1; / . - qq/print qq[first process\\n]; sleep 30;"/; -$cmd2 = qq/$perl -e "use FileHandle; autoflush STDOUT 1; / . - qq/print qq[second process\\n]; sleep 30;"/; +$cmd1 = qq/$perl -e "\$|=1; print qq[first process\\n]; sleep 30;"/; +$cmd2 = qq/$perl -e "\$|=1; print qq[second process\\n]; sleep 30;"/; $cmd3 = qq/$perl -e "print <>;"/; # hangs waiting for end of STDIN $cmd4 = qq/$perl -e "print scalar <>;"/; @@ -76,7 +72,8 @@ print "not " unless $kill_cnt == 2; print "ok 8\n"; # send one expected line of text to child process and then wait for it -autoflush FH4 1; +select(FH4); $| = 1; select(STDOUT); + print FH4 "ok 9\n"; print "# waiting for process $pid4 to exit\n"; $reap_pid = waitpid $pid4, 0; |