version 1.83, 2020/07/05 23:59:45 |
version 1.84, 2020/10/03 09:22:26 |
|
|
const char *term; |
const char *term; |
u_int echar, rid, sid, esid, exitval, type, exitval_seen; |
u_int echar, rid, sid, esid, exitval, type, exitval_seen; |
extern char **environ; |
extern char **environ; |
int r, i, devnull, rawmode; |
int r, i, rawmode; |
|
|
debug3("%s: entering", __func__); |
debug3("%s: entering", __func__); |
|
|
|
|
|
|
ssh_signal(SIGPIPE, SIG_IGN); |
ssh_signal(SIGPIPE, SIG_IGN); |
|
|
if (stdin_null_flag) { |
if (stdin_null_flag && stdfd_devnull(1, 0, 0) == -1) |
if ((devnull = open(_PATH_DEVNULL, O_RDONLY)) == -1) |
fatal("%s: stdfd_devnull failed", __func__); |
fatal("open(/dev/null): %s", strerror(errno)); |
|
if (dup2(devnull, STDIN_FILENO) == -1) |
|
fatal("dup2: %s", strerror(errno)); |
|
if (devnull > STDERR_FILENO) |
|
close(devnull); |
|
} |
|
|
|
if ((term = getenv("TERM")) == NULL) |
if ((term = getenv("TERM")) == NULL) |
term = ""; |
term = ""; |
|
|
struct sshbuf *m; |
struct sshbuf *m; |
char *e; |
char *e; |
u_int type, rid, sid; |
u_int type, rid, sid; |
int r, devnull; |
int r; |
|
|
debug3("%s: entering", __func__); |
debug3("%s: entering", __func__); |
|
|
|
|
|
|
ssh_signal(SIGPIPE, SIG_IGN); |
ssh_signal(SIGPIPE, SIG_IGN); |
|
|
if (stdin_null_flag) { |
if (stdin_null_flag && stdfd_devnull(1, 0, 0) == -1) |
if ((devnull = open(_PATH_DEVNULL, O_RDONLY)) == -1) |
fatal("%s: stdfd_devnull failed", __func__); |
fatal("open(/dev/null): %s", strerror(errno)); |
|
if (dup2(devnull, STDIN_FILENO) == -1) |
|
fatal("dup2: %s", strerror(errno)); |
|
if (devnull > STDERR_FILENO) |
|
close(devnull); |
|
} |
|
|
|
if ((m = sshbuf_new()) == NULL) |
if ((m = sshbuf_new()) == NULL) |
fatal("%s: sshbuf_new", __func__); |
fatal("%s: sshbuf_new", __func__); |