diff options
Diffstat (limited to 'toys/pending/openvt.c')
-rw-r--r-- | toys/pending/openvt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/toys/pending/openvt.c b/toys/pending/openvt.c index f136b1b7..be3070e2 100644 --- a/toys/pending/openvt.c +++ b/toys/pending/openvt.c @@ -110,9 +110,8 @@ void openvt_main(void) while (vt_fd > 2) close(vt_fd--); - pid = vfork(); - if (pid < 0) perror_exit("Fork failed"); - else if (!pid) { + pid = xfork(); + if (!pid) { setsid(); ioctl(vt_fd, TIOCSCTTY, 0); xexec(toys.optargs); |