Pipes broken? 1.3.68 -> Perl 5, Emacs 19.28 affected

Drago Goricanec (drago@iac.co.jp)
Tue, 12 Mar 1996 10:22:07 +0900


I'm having problems with pipes. Can anyone comment on or help me with
this.

I recall a while back someone pointing out a problem with subprocesses
in Emacs losing some the tail end of their output (from a pipe). I'm
experiencing a similar problem. At first, I shrugged it off as some
obscure Emacs bug. But I use PGP (MailCrypt within Emacs), and
decrytping PGP mail will cause larger messages to be truncated.

Then, I wanted to upgrade to Perl5.001e, and I compiled it, and ran the
test. Test io/pipe.t failed on test #7. This is where a pipe is
created, and the reader closes it's end, before all the data has been
read. The test expects a SIGPIPE signal to be raised, which doesn't get
raised.

Here's the code for that test (tests 1..6 are not included).

pipe(READER,WRITER) || die "Can't open pipe";
close READER;

$SIG{'PIPE'} = 'broken_pipe';

sub broken_pipe {
print "ok 7\n";
}

print WRITER "not ok 7\n";
close WRITER;

And here's the output I get from my machine.

% t/io/pipe.t
1..8
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
Broken pipe

I'm running 1.3.68 with SMP enabled (it ran fine for 11 days until it
crashed for some other reason which I'll try to reproduce. This is off
topic, but I was in the middle of FTP to gatekeeper.dec.com, when I
suspended the job [^Z], killed pppd, and brought the ftp back to the
foreground. My machine froze instantly. No sound, no disk activity, no
keyboard and mouse response. This was last night, so I haven't had time
to try this again.)

I can provide additional information about my system, or run more
thorough tests if needed. My system started as Slackware 2.3 a.out, I
upgraded to ELF with the ELF How-To (using gcc2.7.0, libc5.0.9), and
have been upgrading to use the latest kernel from time to time. I will
upgrade again to 1.3.7[23] to take advantage of the SMP fixes real soon.

Drago

P.S. As interesting as the "Linux is/isn't an operating system" thread
is, can we move it to another forum, please.