(main): Set signal handler for SIGPIPE.

(pipe_closed): New function, to handle SIGPIPE.

From-SVN: r3205
This commit is contained in:
Jim Wilson 1993-01-12 14:52:37 -08:00
parent a7c5971afb
commit 9e263fc414
1 changed files with 13 additions and 0 deletions

View File

@ -75,6 +75,7 @@ typedef unsigned char U_CHAR;
#include <sys/stat.h>
#include <ctype.h>
#include <stdio.h>
#include <signal.h>
#ifndef VMS
#ifndef USG
@ -248,6 +249,7 @@ static void fatal ();
void fancy_abort ();
static void pfatal_with_name ();
static void perror_with_name ();
static void pipe_closed ();
static void print_containing_files ();
static int lookup_import ();
static int redundant_include_p ();
@ -983,6 +985,8 @@ main (argc, argv)
}
#endif /* RLIMIT_STACK defined */
signal (SIGPIPE, pipe_closed);
progname = argv[0];
#ifdef VMS
{
@ -8662,6 +8666,15 @@ pfatal_with_name (name)
#endif
}
/* Handler for SIGPIPE. */
static void
pipe_closed (signo)
/* If this is missing, some compilers complain. */
int signo;
{
fatal ("output pipe has been closed");
}
static void
memory_full ()