commit 810620b95f1c0ee8bbbe3458d7c47c2cc0740a6d from: Onana Onana Xavier Manuel date: Wed Aug 12 04:33:10 2026 UTC Fixed nesting exit after kill -9 commit - 6ba5dbba0ae24afbb2f68251959abddba9647e24 commit + 810620b95f1c0ee8bbbe3458d7c47c2cc0740a6d blob - 2e378abe7bf09690301f53a6e189f70c253d6495 blob + 399e116dfa706c5933a71264a1425bfee655b0ae --- ria/wsctl.c +++ ria/wsctl.c @@ -305,7 +305,7 @@ wsctl_fork() close(sv[0]); shell = forkpty(&master, NULL, NULL, NULL); - fprintf(stderr, "forkpty: master=%d, shell=%d\n", master, shell); + //fprintf(stderr, "forkpty: master=%d, shell=%d\n", master, shell); if (shell == -1) { perror("forkpty"); @@ -329,15 +329,14 @@ wsctl_fork() break; if (pfd.revents & (POLLHUP | POLLERR)) { - if (kill(-shell, SIGTERM) == -1) + if (kill(-shell, SIGKILL) == -1) perror("kill"); + close(master); if (waitpid(shell, NULL, 0) == -1) perror("waitpid"); break; } } - printf("Death\n"); - close(master); close(sv[1]); _exit(0); }