Mercurial > dropbear
comparison svr-chansession.c @ 1042:9699b9438ad9
Revert accidental commented out signal handlers
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 24 Feb 2015 22:23:32 +0800 |
parents | 2b4fd440399d |
children | aae71c5f7d5b |
comparison
equal
deleted
inserted
replaced
1041:3fb883a6aa81 | 1042:9699b9438ad9 |
---|---|
785 if (pid == 0) { | 785 if (pid == 0) { |
786 /* child */ | 786 /* child */ |
787 | 787 |
788 TRACE(("back to normal sigchld")) | 788 TRACE(("back to normal sigchld")) |
789 /* Revert to normal sigchld handling */ | 789 /* Revert to normal sigchld handling */ |
790 /* | |
791 if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) { | 790 if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) { |
792 dropbear_exit("signal() error"); | 791 dropbear_exit("signal() error"); |
793 } | 792 } |
794 */ | |
795 | 793 |
796 /* redirect stdin/stdout/stderr */ | 794 /* redirect stdin/stdout/stderr */ |
797 close(chansess->master); | 795 close(chansess->master); |
798 | 796 |
799 pty_make_controlling_tty(&chansess->slave, chansess->tty); | 797 pty_make_controlling_tty(&chansess->slave, chansess->tty); |
1005 svr_ses.childpidsize = 1; | 1003 svr_ses.childpidsize = 1; |
1006 svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */ | 1004 svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */ |
1007 sa_chld.sa_handler = sesssigchild_handler; | 1005 sa_chld.sa_handler = sesssigchild_handler; |
1008 sa_chld.sa_flags = SA_NOCLDSTOP; | 1006 sa_chld.sa_flags = SA_NOCLDSTOP; |
1009 sigemptyset(&sa_chld.sa_mask); | 1007 sigemptyset(&sa_chld.sa_mask); |
1010 /* | |
1011 if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) { | 1008 if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) { |
1012 dropbear_exit("signal() error"); | 1009 dropbear_exit("signal() error"); |
1013 } | 1010 } |
1014 */ | |
1015 | 1011 |
1016 } | 1012 } |
1017 | 1013 |
1018 /* add a new environment variable, allocating space for the entry */ | 1014 /* add a new environment variable, allocating space for the entry */ |
1019 void addnewvar(const char* param, const char* var) { | 1015 void addnewvar(const char* param, const char* var) { |