diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-06 06:43:46 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-06 06:43:46 +0000 |
commit | 7f4de7e0523ff79f5dfc36baffb040ec28856bea (patch) | |
tree | 87dc39a291434eeb46b130b5a4e405526b4a8d94 /usr.bin/rsh | |
parent | 9d40e48734d942a6950e151e86c2be4c8e2799fc (diff) |
save errno in mangly handlers
Diffstat (limited to 'usr.bin/rsh')
-rw-r--r-- | usr.bin/rsh/rsh.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index 5d43207bd7d..3fd08745819 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsh.c,v 1.15 1997/07/25 21:05:39 mickey Exp $ */ +/* $OpenBSD: rsh.c,v 1.16 1997/08/06 06:43:41 deraadt Exp $ */ /*- * Copyright (c) 1983, 1990 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rsh.c 5.24 (Berkeley) 7/1/91";*/ -static char rcsid[] = "$OpenBSD: rsh.c,v 1.15 1997/07/25 21:05:39 mickey Exp $"; +static char rcsid[] = "$OpenBSD: rsh.c,v 1.16 1997/08/06 06:43:41 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -406,12 +406,15 @@ void sendsig(signo) char signo; { + int save_errno = errno; + #ifdef KERBEROS if (doencrypt) (void)des_write(rfd2, &signo, 1); else #endif (void)write(rfd2, &signo, 1); + errno = save_errno; } #ifdef KERBEROS |