From 902c5f15ef5944f27bad0c4a0c02fec3a7112c18 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Tue, 28 Oct 1980 03:09:17 -0800 Subject: [PATCH] fix botch in SIGPIPE catching; map diagnostic to std out in mailers SCCS-vsn: usr.sbin/sendmail/src/deliver.c 1.10 --- usr/src/usr.sbin/sendmail/src/deliver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr/src/usr.sbin/sendmail/src/deliver.c b/usr/src/usr.sbin/sendmail/src/deliver.c index 35ebdd4c29..7fdf7d89f6 100644 --- a/usr/src/usr.sbin/sendmail/src/deliver.c +++ b/usr/src/usr.sbin/sendmail/src/deliver.c @@ -6,7 +6,7 @@ # include # endif LOG -static char SccsId[] = "@(#)deliver.c 1.9 %G%"; +static char SccsId[] = "@(#)deliver.c 1.10 %G%"; /* ** DELIVER -- Deliver a message to a particular address. @@ -200,6 +200,9 @@ deliver(to, editfcn) else if (pid == 0) { /* child -- set up input & exec mailer */ + /* make diagnostic output be standard output */ + close(2); + dup(1); signal(SIGINT, SIG_IGN); if (editfcn != NULL) { @@ -404,6 +407,7 @@ putheader(fp) pipesig() { syserr("Broken pipe"); + signal(SIGPIPE, SIG_IGN); } /* ** SENDTO -- Designate a send list. -- 2.20.1