diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-16 09:26:09 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-16 09:26:09 +0000 |
commit | 6f36a51ecc63fe3d7e3852fadd9daeabb675778f (patch) | |
tree | 00c6f45642a816009b18ead7e0f1de1693891e2b /usr.sbin/pppoe | |
parent | def31bf5effc9d79f00423ae3d171375848dfc45 (diff) |
do not trash errno in signal handler
Diffstat (limited to 'usr.sbin/pppoe')
-rw-r--r-- | usr.sbin/pppoe/pppoe.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pppoe/pppoe.c b/usr.sbin/pppoe/pppoe.c index ab1e89a0efd..35740a131fe 100644 --- a/usr.sbin/pppoe/pppoe.c +++ b/usr.sbin/pppoe/pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoe.c,v 1.1 2000/06/18 07:30:41 jason Exp $ */ +/* $OpenBSD: pppoe.c,v 1.2 2001/01/16 09:26:08 deraadt Exp $ */ /* * Copyright (c) 2000 Network Security Technologies, Inc. http://www.netsec.net @@ -392,9 +392,12 @@ void child_handler(sig) int sig; { + int save_errno = errno; int status; - while (wait3(&status, WNOHANG, NULL) > 0); + while (wait3(&status, WNOHANG, NULL) > 0) + ; + errno = save_errno; } int |