diff options
| author | 1998-04-25 00:09:03 +0000 | |
|---|---|---|
| committer | 1998-04-25 00:09:03 +0000 | |
| commit | 39c69f5450d4a3ce82813b2d65afdc6da34f524f (patch) | |
| tree | 61fead8c227307b68bbc241459d48666474aec3b | |
| parent | update release: korean mirror (diff) | |
| download | wireguard-openbsd-39c69f5450d4a3ce82813b2d65afdc6da34f524f.tar.xz wireguard-openbsd-39c69f5450d4a3ce82813b2d65afdc6da34f524f.zip | |
ignore SIGPIPE; nathanw@MIT.EDU
| -rw-r--r-- | sbin/reboot/reboot.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index c3e22628639..9571a77ee16 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reboot.c,v 1.10 1997/09/03 21:18:38 mickey Exp $ */ +/* $OpenBSD: reboot.c,v 1.11 1998/04/25 00:09:03 deraadt Exp $ */ /* $NetBSD: reboot.c,v 1.8 1995/10/05 05:36:22 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: reboot.c,v 1.10 1997/09/03 21:18:38 mickey Exp $"; +static char rcsid[] = "$OpenBSD: reboot.c,v 1.11 1998/04/25 00:09:03 deraadt Exp $"; #endif #endif /* not lint */ @@ -160,6 +160,12 @@ main(argc, argv) /* Ignore the SIGHUP we get when our parent shell dies. */ (void)signal(SIGHUP, SIG_IGN); + /* + * If we're running in a pipeline, we don't want to die + * after killing whatever we're writing to. + */ + (void)signal(SIGPIPE, SIG_IGN); + if (access(_PATH_RCSHUTDOWN, R_OK) != -1) { pid_t pid; |
