shell: check process termination before closing
This commit is contained in:
parent
668a4be142
commit
8a9c4412ed
1 changed files with 2 additions and 1 deletions
|
|
@ -2400,7 +2400,8 @@ static void shell_read_cb(void *opaque)
|
|||
|
||||
len = read(s->pty_fd, buf, sizeof(buf));
|
||||
if (len <= 0) {
|
||||
shell_close(s);
|
||||
if (s->pid == -1)
|
||||
shell_close(s);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue