diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-26 18:00:42 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-26 18:00:42 +0000 |
commit | b5ac7add8214b5b1d3a3557e63ece819dd1e7c56 (patch) | |
tree | 4f840a357fe1ddb27d0a850af958636843ab0179 /usr.bin/window/wwenviron.c | |
parent | bc349e2e6d187585cab3ce4d8d434fc87cced2a0 (diff) |
from netbsd:
Use POSIX signals. Always set FNONBLOCK on the tty.
Eliminate the use of SIGIO, and some other cleanup.
We don't need non-blocking mode without SIGIO.
Diffstat (limited to 'usr.bin/window/wwenviron.c')
-rw-r--r-- | usr.bin/window/wwenviron.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/window/wwenviron.c b/usr.bin/window/wwenviron.c index 69a168a3308..229bd47991d 100644 --- a/usr.bin/window/wwenviron.c +++ b/usr.bin/window/wwenviron.c @@ -1,4 +1,4 @@ -/* $NetBSD: wwenviron.c,v 1.3 1995/09/28 10:35:27 tls Exp $ */ +/* $NetBSD: wwenviron.c,v 1.4 1995/12/21 08:39:50 mycroft Exp $ */ /* * Copyright (c) 1983, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)wwenviron.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$NetBSD: wwenviron.c,v 1.3 1995/09/28 10:35:27 tls Exp $"; +static char rcsid[] = "$NetBSD: wwenviron.c,v 1.4 1995/12/21 08:39:50 mycroft Exp $"; #endif #endif /* not lint */ @@ -61,6 +61,7 @@ register struct ww *wp; int pgrp = getpid(); #endif char buf[1024]; + sigset_t sigset; #ifndef TIOCSCTTY if ((i = open("/dev/tty", 0)) < 0) @@ -90,7 +91,8 @@ register struct ww *wp; #endif /* SIGPIPE is the only one we ignore */ (void) signal(SIGPIPE, SIG_DFL); - (void) sigsetmask(0); + sigemptyset(&sigset); + sigprocmask(SIG_SETMASK, &sigset, (sigset_t *)0); /* * Two conditions that make destructive setenv ok: * 1. setenv() copies the string, |