mirror of
https://github.com/clearml/dropbear
synced 2025-03-04 02:57:46 +00:00
Initialise the "lastexit" variable so that we don't get session channels
terminating prematurely. --HG-- extra : convert_revision : 5cb8d5a7c8fe405fa4d49906f66a61590ae4a087
This commit is contained in:
parent
028e79ddda
commit
5c6e8b833e
@ -960,6 +960,7 @@ void svr_chansessinitialise() {
|
|||||||
svr_ses.childpids[0].pid = -1; /* unused */
|
svr_ses.childpids[0].pid = -1; /* unused */
|
||||||
svr_ses.childpids[0].chansess = NULL;
|
svr_ses.childpids[0].chansess = NULL;
|
||||||
svr_ses.childpidsize = 1;
|
svr_ses.childpidsize = 1;
|
||||||
|
svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */
|
||||||
sa_chld.sa_handler = sesssigchild_handler;
|
sa_chld.sa_handler = sesssigchild_handler;
|
||||||
sa_chld.sa_flags = SA_NOCLDSTOP;
|
sa_chld.sa_flags = SA_NOCLDSTOP;
|
||||||
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
|
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user