Lines Matching defs:exit
70 TRACE(("sesscheckclose, pid is %d", chansess->exit.exitpid))
71 return chansess->exit.exitpid != -1;
79 * use the svr_ses.lastexit struct to hold the exit, which is then compared by
88 struct exitinfo *exit = NULL;
94 exit = NULL;
99 exit = &svr_ses.childpids[i].chansess->exit;
106 if (exit == NULL) {
108 exit = &svr_ses.lastexit;
111 exit->exitpid = pid;
113 exit->exitstatus = WEXITSTATUS(status);
116 exit->exitsignal = WTERMSIG(status);
118 exit->exitcore = WCOREDUMP(status);
120 exit->exitcore = 0;
124 exit->exitsignal = -1;
144 /* send the exit status or the signal causing termination for a session */
149 if (chansess->exit.exitpid >= 0) {
150 if (chansess->exit.exitsignal > 0) {
162 dropbear_assert(chansess->exit.exitpid != -1);
163 dropbear_assert(chansess->exit.exitsignal == -1);
169 buf_putstring(ses.writepayload, "exit-status", 11);
171 buf_putint(ses.writepayload, chansess->exit.exitstatus);
177 /* send the signal causing the exit to the client */
183 dropbear_assert(chansess->exit.exitpid != -1);
184 dropbear_assert(chansess->exit.exitsignal > 0);
186 TRACE(("send_msg_chansess_exitsignal %d", chansess->exit.exitsignal))
193 if (signames[i].signal == chansess->exit.exitsignal) {
205 buf_putstring(ses.writepayload, "exit-signal", 11);
208 buf_putbyte(ses.writepayload, chansess->exit.exitcore);
232 chansess->exit.exitpid = -1;
297 TRACE(("exitpid is %d", chansess->exit.exitpid))
703 svr_ses.childpids[i].chansess->exit = svr_ses.lastexit;
846 /* Add the pid of a child to the list for exit-handling */
1003 /* Set up the general chansession environment, in particular child-exit