diff options
author | deraadt@openbsd.org <deraadt@openbsd.org> | 2024-06-27 01:14:14 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-06-28 00:34:49 +0200 |
commit | b8793e2b0851f7d71b97554fa5260b23796d6277 (patch) | |
tree | e1ac8a1974c9dc7c60e622d84528bc099da61c96 /sftp.c | |
parent | upstream: - uppercase start of sentence - correct sentence grammar (diff) | |
download | openssh-b8793e2b0851f7d71b97554fa5260b23796d6277.tar.xz openssh-b8793e2b0851f7d71b97554fa5260b23796d6277.zip |
upstream: save_errno wrappers inside two small signal handlers that
perform system calls, for systems with libc that do perform libc sigtramps.
ok djm markus
OpenBSD-Commit-ID: 7749b56419a7c9dcfe4c6c04811e429813346c62
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.238 2024/04/30 06:16:55 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.239 2024/06/26 23:14:14 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -234,12 +234,14 @@ killchild(int signo) static void suspchild(int signo) { + int save_errno = errno; if (sshpid > 1) { kill(sshpid, signo); while (waitpid(sshpid, NULL, WUNTRACED) == -1 && errno == EINTR) continue; } kill(getpid(), SIGSTOP); + errno = save_errno; } static void |