summaryrefslogtreecommitdiffstats
path: root/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/scp.c b/scp.c
index 492dace..0779c3c 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.260 2023/10/11 05:42:08 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.261 2024/06/26 23:14:14 deraadt Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -222,9 +222,11 @@ suspone(int pid, int signo)
static void
suspchild(int signo)
{
+ int save_errno = errno;
suspone(do_cmd_pid, signo);
suspone(do_cmd_pid2, signo);
kill(getpid(), SIGSTOP);
+ errno = save_errno;
}
static int