summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Dunlop <domo@slipper.ip.lu>1997-05-01 12:48:26 +0200
committerChip Salzenberg <chip@atlantic.net>1997-05-01 00:00:00 +1200
commitfc2615281e1f6be0fb2f6c1497f85eea8b36442b (patch)
tree80d0a1b07057a33c9a3b836af110a9a40bfac9c2
parent05475680fbb0187887aec733f8c78c90733ace24 (diff)
downloadperl-fc2615281e1f6be0fb2f6c1497f85eea8b36442b.tar.gz
Disable op/pipe.t test under Machten
At 09:47 +0200 1997-05-01, I wrote: >Everything else is as expected, but I'm looking into this: > >dialup02 domo$ ./TEST io/pipe.t >io/pipe...........print failed: Broken pipe at ./io/pipe.t line 86. >FAILED on test 9 Here's a patch. It seems MachTen doesn't behave like native UNIX here, so punt. Given that VMS doesn't behave like native UNIX either (and there's been nothing on the list yet about NT and other "aliens"), test 9 looks like a good emulation exposer. Is this what we want? As far as I can make out from a little mucking about and a reading of ISO 9945-1:1990, MachTen is behaving in a way that POSIX allows: stdio elects not to buffer writes on pipes (a defensible decision); a write on a broken pipe fails with EPIPE and raises SIGPIPE (correct by POSIX); close of a broken pipe succeeds (correct by POSIX,and OK by perl: nothing's buffered, because the write failed) if the pipe reader exited with zero status. Slightly disconcertingly, I discover that, if I substitute the command 'false' for 'true' as the putative pipe reader, the (perl) close fails. close() is not documented as failing if a pipe reader has terminated with a non-zero exit code. Is this a documentation shortcoming, a general perl bug, or a MachTen perl bug? Whether close() suceeds or fails, $? is set appropriately. Whatever, so as to get 5.004 out of the door, either apply this patch or do away with test 9 entirely, pending deeper reflection. p5p-msgid: v03102801af8e160d3879@[194.51.248.68]
-rwxr-xr-xt/io/pipe.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/io/pipe.t b/t/io/pipe.t
index 21f02a789a..ac149810ec 100755
--- a/t/io/pipe.t
+++ b/t/io/pipe.t
@@ -74,9 +74,10 @@ if ($^O eq 'VMS') {
exit;
}
-if ($Config{d_sfio}) {
+if ($Config{d_sfio} || $^O eq machten) {
# Sfio doesn't report failure when closing a broken pipe
- # that has pending output. Go figure.
+ # that has pending output. Go figure. MachTen doesn't either,
+ # but won't write to broken pipes, so nothing's pending at close.
print "ok 9\n";
}
else {