When linking with libc_r and catching SIGPIPE, a write() call on a pipe or socket with no reader doesn't return an error. The program seems to be looping sending/catching SIGPIPES. This is a real problem for a network server that talks to the client before forking, or needs to cleanup when the client goes away. Fix: No idea. How-To-Repeat: The following trivial program can be used. Pipe it to 'more' and type 'q'. If the program was linked normally, it prints the normal error (write: Broken pipe). If linked with libc_r it loops forever, printing "Got sig 13". #include <stdio.h> #include <signal.h> void sigshow(int sig) { fprintf(stderr, "Got sig %d\n", sig); } main() { struct sigaction sa; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); sa.sa_handler = sigshow; sigaction(SIGPIPE, &sa, NULL); for (;;) { if (write(1, "THIS IS DATA\n", 13) != 13) { perror("write"); exit(1); } } }
State Changed From-To: open->closed Confirmed fixed by originator.