From 3ac8638b4c875d2db479afc28dc336a80ed546fa Mon Sep 17 00:00:00 2001 From: doy Date: Tue, 3 Feb 2009 20:04:18 -0500 Subject: close the child ptys after tests that spawn things in them --- t/003-subprocess.t | 2 +- t/010-read-write.t | 2 +- t/100-system.t | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/t/003-subprocess.t b/t/003-subprocess.t index c5d17bd..352b7b4 100644 --- a/t/003-subprocess.t +++ b/t/003-subprocess.t @@ -18,4 +18,4 @@ unlike($outside_of_pty, qr/ok/, "running outside of pty fails -t checks"); $script .= "sleep 1 while 1;"; $pty->spawn("$^X -e '$script'"); like($pty->read, qr/ok/, "runs subprocess in a pty"); -$pty->kill; +$pty->close; diff --git a/t/010-read-write.t b/t/010-read-write.t index a7ad8c7..8e401ad 100644 --- a/t/010-read-write.t +++ b/t/010-read-write.t @@ -12,4 +12,4 @@ like($pty->read, qr/testing/, "basic read/write testing"); # if the perl script ends with a subprocess still running, the test will exit # with the exit status of the signal that the subprocess dies with, so we have # to kill the subprocess before exiting. -$pty->kill; +$pty->close; diff --git a/t/100-system.t b/t/100-system.t index 5c64156..bfc423a 100644 --- a/t/100-system.t +++ b/t/100-system.t @@ -28,3 +28,4 @@ eval { }; isnt($@, "alarm2\n", "system() didn't time out (after kill)"); is($output, "bar", "system() got the right value (after kill)"); +$pty->close; -- cgit v1.2.3-54-g00ecf