diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-07 21:49:19 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-07 21:49:19 +0000 |
commit | 18f47398fbd50e53bbfcff1eac733e1f135febbd (patch) | |
tree | d68fbc5ff437886eb8981752ccf708ef3729fa37 /sbin/fdisk/cmd.c | |
parent | a8139cbdcca4d8b2cf9b5b00fb28001dc8c81559 (diff) |
protect against SIGPIPE
Diffstat (limited to 'sbin/fdisk/cmd.c')
-rw-r--r-- | sbin/fdisk/cmd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c index b1dd77b4b41..5a0b198e559 100644 --- a/sbin/fdisk/cmd.c +++ b/sbin/fdisk/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.16 1998/01/04 23:57:29 deraadt Exp $ */ +/* $OpenBSD: cmd.c,v 1.17 1998/08/07 21:49:18 millert Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -389,6 +389,7 @@ Xmanual(cmd, disk, mbr, tt, offset) int offset; { char *pager = "/usr/bin/less"; + sig_t opipe = signal(SIGPIPE, SIG_IGN); extern char manpage[]; FILE *f; @@ -400,5 +401,6 @@ Xmanual(cmd, disk, mbr, tt, offset) pclose(f); } + (void)signal(SIGPIPE, opipe); return (CMD_CONT); } |