shell: check process termination before closing

This commit is contained in:
huwwa 2026-05-05 02:21:32 +03:00 • committed by Charlie Gordon
commit 8a9c4412ed

View file

@ -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;
}