From b5f54d7740ec83266905896d7f3fb9ad80ed0e7b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 6 Aug 1997 18:58:06 +0000 Subject: [PATCH] save errno from being clobbered by wait(). From Theo --- logging.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/logging.c b/logging.c index b3eeced5d..e2311eb19 100644 --- a/logging.c +++ b/logging.c @@ -536,10 +536,13 @@ static void send_mail() static RETSIGTYPE reapchild(sig) int sig; { + int save_errno = errno; + (void) wait(NULL); #ifndef POSIX_SIGNALS (void) signal(SIGCHLD, reapchild); #endif /* POSIX_SIGNALS */ + errno = save_errno; } -- 2.50.1