1/* $OpenBSD: scp.c,v 1.255 2023/03/31 04:45:08 dtucker Exp $ */ |
2/* 3 * scp - secure remote copy. This is basically patched BSD rcp which 4 * uses ssh to do the data transfer (instead of using rcmd). 5 * 6 * NOTE: This version should NOT be suid root. (This uses ssh to 7 * do the transfer and ssh has the necessary privileges.) 8 * 9 * 1995 Timo Rinne <tri@iki.fi>, Tatu Ylonen <ylo@cs.hut.fi> --- 151 unchanged lines hidden (view full) --- 161int remote_glob(struct sftp_conn *, const char *, int, 162 int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */ 163 164static void 165killchild(int signo) 166{ 167 if (do_cmd_pid > 1) { 168 kill(do_cmd_pid, signo ? signo : SIGTERM); |
169 (void)waitpid(do_cmd_pid, NULL, 0); |
170 } 171 if (do_cmd_pid2 > 1) { 172 kill(do_cmd_pid2, signo ? signo : SIGTERM); |
173 (void)waitpid(do_cmd_pid2, NULL, 0); |
174 } 175 176 if (signo) 177 _exit(1); 178 exit(1); 179} 180 181static void --- 2008 unchanged lines hidden --- |