replace sleep with waitpid
This commit is contained in:
parent
ddd874c4b8
commit
b84d9af16a
3
main.c
3
main.c
@ -448,10 +448,11 @@ static int ssh_copy_chan_to_fd(ssh_session session,
|
||||
|
||||
static void ssh_chan_close(ssh_session session, ssh_channel channel, void *userdata) {
|
||||
int fd = *(int*)userdata;
|
||||
int status;
|
||||
(void)session;
|
||||
(void)channel;
|
||||
kill(bbs_pid, SIGTERM);
|
||||
sleep(10);
|
||||
waitpid(bbs_pid, &status, 0);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user