projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix botch in SIGPIPE catching; map diagnostic to std out in mailers
[unix-history]
/
usr
/
src
/
usr.sbin
/
sendmail
/
src
/
deliver.c
diff --git
a/usr/src/usr.sbin/sendmail/src/deliver.c
b/usr/src/usr.sbin/sendmail/src/deliver.c
index
35ebdd4
..
7fdf7d8
100644
(file)
--- a/
usr/src/usr.sbin/sendmail/src/deliver.c
+++ b/
usr/src/usr.sbin/sendmail/src/deliver.c
@@
-6,7
+6,7
@@
# include <log.h>
# endif LOG
# include <log.h>
# 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.
/*
** 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 */
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)
{
signal(SIGINT, SIG_IGN);
if (editfcn != NULL)
{
@@
-404,6
+407,7
@@
putheader(fp)
pipesig()
{
syserr("Broken pipe");
pipesig()
{
syserr("Broken pipe");
+ signal(SIGPIPE, SIG_IGN);
}
\f
/*
** SENDTO -- Designate a send list.
}
\f
/*
** SENDTO -- Designate a send list.