version 1.25, 2001/10/02 01:14:55 |
version 1.26, 2001/11/16 23:57:12 |
|
|
void copytochild __P((int)); |
void copytochild __P((int)); |
__dead void doit __P((sigset_t *)); |
__dead void doit __P((sigset_t *)); |
__dead void done __P((int)); |
__dead void done __P((int)); |
|
__dead void sig_done __P((int)); |
void echo __P((char)); |
void echo __P((char)); |
u_int getescape __P((char *)); |
u_int getescape __P((char *)); |
void lostpeer __P((int)); |
void lostpeer __P((int)); |
|
|
exit(status); |
exit(status); |
} |
} |
|
|
|
__dead void |
|
sig_done(status) |
|
int status; |
|
{ |
|
int w, wstatus; |
|
|
|
mode(0); |
|
if (child > 0) { |
|
/* make sure catch_child does not snap it up */ |
|
(void)signal(SIGCHLD, SIG_DFL); |
|
if (kill(child, SIGKILL) >= 0) |
|
while ((w = wait(&wstatus)) > 0 && w != child) |
|
; |
|
} |
|
_exit(status); |
|
} |
|
|
int dosigwinch; |
int dosigwinch; |
|
|
/* |
/* |
|
|
if (pid == child && !WIFSTOPPED(status)) { |
if (pid == child && !WIFSTOPPED(status)) { |
child = -1; |
child = -1; |
if (WIFEXITED(status)) |
if (WIFEXITED(status)) |
done(WEXITSTATUS(status)); |
sig_done(WEXITSTATUS(status)); |
done(WTERMSIG(status)); |
sig_done(WTERMSIG(status)); |
} |
} |
} |
} |
errno = save_errno; |
errno = save_errno; |