summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/session.c b/session.c
index a0020d426..1e996f95a 100644
--- a/session.c
+++ b/session.c
@@ -480,8 +480,6 @@ do_exec_no_pty(Session *s, const char *command, struct passwd * pw)
480 if (s == NULL) 480 if (s == NULL)
481 fatal("do_exec_no_pty: no session"); 481 fatal("do_exec_no_pty: no session");
482 482
483 signal(SIGPIPE, SIG_DFL);
484
485 session_proctitle(s); 483 session_proctitle(s);
486 484
487#ifdef USE_PAM 485#ifdef USE_PAM
@@ -493,6 +491,8 @@ do_exec_no_pty(Session *s, const char *command, struct passwd * pw)
493 /* Child. Reinitialize the log since the pid has changed. */ 491 /* Child. Reinitialize the log since the pid has changed. */
494 log_init(__progname, options.log_level, options.log_facility, log_stderr); 492 log_init(__progname, options.log_level, options.log_facility, log_stderr);
495 493
494 signal(SIGPIPE, SIG_DFL);
495
496 /* 496 /*
497 * Create a new session and process group since the 4.4BSD 497 * Create a new session and process group since the 4.4BSD
498 * setlogin() affects the entire process group. 498 * setlogin() affects the entire process group.
@@ -606,6 +606,8 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw)
606 /* Child. Reinitialize the log because the pid has changed. */ 606 /* Child. Reinitialize the log because the pid has changed. */
607 log_init(__progname, options.log_level, options.log_facility, log_stderr); 607 log_init(__progname, options.log_level, options.log_facility, log_stderr);
608 608
609 signal(SIGPIPE, SIG_DFL);
610
609 /* Close the master side of the pseudo tty. */ 611 /* Close the master side of the pseudo tty. */
610 close(ptyfd); 612 close(ptyfd);
611 613