[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
writing to read-end-closed-pipe does not generate signal
From: |
Marcus Brinkmann |
Subject: |
writing to read-end-closed-pipe does not generate signal |
Date: |
Tue, 16 Apr 2002 21:42:41 -0400 |
User-agent: |
Mutt/1.3.25i |
Hi,
the following test program does not generate a SIGPIPE, as it probably
should. At least the Perl test harnish expects that.
Thanks,
Marcus
#include <signal.h>
#include <string.h>
void foo (int nr)
{
printf ("Buh!\n");
}
main()
{
int fds[2];
signal (SIGPIPE, foo);
pipe (fds);
close (fds[0]);
write (fds[1], "hallo", 6);
close (fds[1]);
sleep (1);
return 0;
}
- writing to read-end-closed-pipe does not generate signal,
Marcus Brinkmann <=