version 1.2, 2019/02/10 23:24:14 |
version 1.3, 2019/02/11 21:41:22 |
|
|
|
|
/* Construct the remote shell command. */ |
/* Construct the remote shell command. */ |
|
|
if (NULL == (args = fargs_cmdline(&sess, f))) { |
if ((args = fargs_cmdline(&sess, f)) == NULL) { |
ERRX1(&sess, "fargs_cmdline"); |
ERRX1(&sess, "fargs_cmdline"); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
} |
} |
|
|
|
|
/* Make sure the child's stdin is from the sender. */ |
/* Make sure the child's stdin is from the sender. */ |
|
|
if (-1 == dup2(fd, STDIN_FILENO)) { |
if (dup2(fd, STDIN_FILENO) == -1) { |
ERR(&sess, "dup2"); |
ERR(&sess, "dup2"); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
} if (-1 == dup2(fd, STDOUT_FILENO)) { |
} if (dup2(fd, STDOUT_FILENO) == -1) { |
ERR(&sess, "dup2"); |
ERR(&sess, "dup2"); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
} |
} |