Return to scp.c CVS log | Up to [local] / src / usr.bin / ssh |
version 1.252, 2023/01/10 23:22:15 | version 1.253, 2023/03/03 03:12:24 | ||
---|---|---|---|
|
|
||
/* Fork a child to execute the command on the remote host using ssh. */ | /* Fork a child to execute the command on the remote host using ssh. */ | ||
pid = fork(); | pid = fork(); | ||
if (pid == 0) { | if (pid == 0) { | ||
dup2(fdin, 0); | if (dup2(fdin, 0) == -1) | ||
dup2(fdout, 1); | perror("dup2"); | ||
if (dup2(fdout, 1) == -1) | |||
perror("dup2"); | |||
replacearg(&args, 0, "%s", ssh_program); | replacearg(&args, 0, "%s", ssh_program); | ||
if (port != -1) { | if (port != -1) { |