mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-24 20:54:21 +01:00
pty: fix error handling
This commit is contained in:
@@ -418,7 +418,7 @@ int pty_spawn(pty_process *process, pty_read_cb read_cb, pty_exit_cb exit_cb) {
|
||||
pid = forkpty(&master, NULL, NULL, &size);
|
||||
if (pid < 0) {
|
||||
status = -errno;
|
||||
goto error;
|
||||
return status;
|
||||
} else if (pid == 0) {
|
||||
setsid();
|
||||
int ret = execvp(process->argv[0], process->argv);
|
||||
|
||||
Reference in New Issue
Block a user