diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-14 19:50:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-14 19:50:24 +0000 |
commit | e051d6040ce0f4bc213f6cb44a3cb790cb0be780 (patch) | |
tree | abf7456d538fcf08da5abeb88870a04c29398c4c /lib/libutil/passwd.c | |
parent | bd14d90001a9f9274150dd6beb5235bedcd73792 (diff) |
save errno in signal handler
Diffstat (limited to 'lib/libutil/passwd.c')
-rw-r--r-- | lib/libutil/passwd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c index a0f817ae9c7..461ed94fb6f 100644 --- a/lib/libutil/passwd.c +++ b/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.28 2001/08/26 03:28:30 millert Exp $ */ +/* $OpenBSD: passwd.c,v 1.29 2001/11/14 19:50:23 deraadt Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: passwd.c,v 1.28 2001/08/26 03:28:30 millert Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.29 2001/11/14 19:50:23 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -336,9 +336,11 @@ static void pw_cont(sig) int sig; { + int save_errno = errno; if (editpid != -1) kill(editpid, sig); + errno = save_errno; } void |