diff options
author | 2001-01-16 09:26:08 +0000 | |
---|---|---|
committer | 2001-01-16 09:26:08 +0000 | |
commit | 259a43f8094203aeb6cc916f7d98ffbdc816c7eb (patch) | |
tree | baf68287e485f8eff0f813083003eb855fc3ad1c | |
parent | Revert last commit. (diff) | |
download | wireguard-openbsd-259a43f8094203aeb6cc916f7d98ffbdc816c7eb.tar.xz wireguard-openbsd-259a43f8094203aeb6cc916f7d98ffbdc816c7eb.zip |
do not trash errno in signal handler
-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 e5757b522fa..35740a131fe 100644 --- a/usr.sbin/pppoe/pppoe.c +++ b/usr.sbin/pppoe/pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoe.c,v 1.1.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 |