summaryrefslogtreecommitdiffstats
path: root/usr.bin/vacation
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-04-23 22:36:51 +0000
committerache <ache@FreeBSD.org>1997-04-23 22:36:51 +0000
commit2d3f3d2ffc015e37c6057c408889739e8c00e1f0 (patch)
treeca77ac4720c833cba0d463eebf7600a6a6de0bc6 /usr.bin/vacation
parentbb67f32a94668877b2e5a0b50ae4592145af4454 (diff)
downloadFreeBSD-src-2d3f3d2ffc015e37c6057c408889739e8c00e1f0.zip
FreeBSD-src-2d3f3d2ffc015e37c6057c408889739e8c00e1f0.tar.gz
Better fix: return vfork() again, but remove clobbering fclose()
and use _exit() instead of exit()
Diffstat (limited to 'usr.bin/vacation')
-rw-r--r--usr.bin/vacation/vacation.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/vacation/vacation.c b/usr.bin/vacation/vacation.c
index fa8b591..49fc619 100644
--- a/usr.bin/vacation/vacation.c
+++ b/usr.bin/vacation/vacation.c
@@ -40,7 +40,7 @@ static char copyright[] =
#ifndef lint
static char sccsid[] = "From: @(#)vacation.c 8.2 (Berkeley) 1/26/94";
static char rcsid[] =
- "$Id: vacation.c,v 1.6 1997/03/29 04:33:44 imp Exp $";
+ "$Id: vacation.c,v 1.7 1997/04/23 22:25:20 ache Exp $";
#endif /* not lint */
/*
@@ -415,7 +415,7 @@ sendmessage(myname)
syslog(LOG_ERR, "vacation: pipe: %s", strerror(errno));
exit(1);
}
- i = fork();
+ i = vfork();
if (i < 0) {
syslog(LOG_ERR, "vacation: fork: %s", strerror(errno));
exit(1);
@@ -424,11 +424,10 @@ sendmessage(myname)
dup2(pvect[0], 0);
close(pvect[0]);
close(pvect[1]);
- fclose(mfp);
execl(_PATH_SENDMAIL, "sendmail", "-f", myname, from, NULL);
syslog(LOG_ERR, "vacation: can't exec %s: %s",
_PATH_SENDMAIL, strerror(errno));
- exit(1);
+ _exit(1);
}
close(pvect[0]);
sfp = fdopen(pvect[1], "w");
OpenPOWER on IntegriCloud