Mercurial > dropbear
comparison svr-chansession.c @ 133:b4cfe976c8e1
Initialise the "lastexit" variable so that we don't get session channels
terminating prematurely.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 17 Oct 2004 08:19:47 +0000 |
parents | 154c8d5a6d1e |
children | 0cfba3034be5 |
comparison
equal
deleted
inserted
replaced
132:c56d40d54538 | 133:b4cfe976c8e1 |
---|---|
958 /* single child process intially */ | 958 /* single child process intially */ |
959 svr_ses.childpids = (struct ChildPid*)m_malloc(sizeof(struct ChildPid)); | 959 svr_ses.childpids = (struct ChildPid*)m_malloc(sizeof(struct ChildPid)); |
960 svr_ses.childpids[0].pid = -1; /* unused */ | 960 svr_ses.childpids[0].pid = -1; /* unused */ |
961 svr_ses.childpids[0].chansess = NULL; | 961 svr_ses.childpids[0].chansess = NULL; |
962 svr_ses.childpidsize = 1; | 962 svr_ses.childpidsize = 1; |
963 svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */ | |
963 sa_chld.sa_handler = sesssigchild_handler; | 964 sa_chld.sa_handler = sesssigchild_handler; |
964 sa_chld.sa_flags = SA_NOCLDSTOP; | 965 sa_chld.sa_flags = SA_NOCLDSTOP; |
965 if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) { | 966 if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) { |
966 dropbear_exit("signal() error"); | 967 dropbear_exit("signal() error"); |
967 } | 968 } |