[PATCH 0/1] MR3290: Draft: start: Ensure child process is killed upon ctrl-c.
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3290
From: Eric Pouech <epouech(a)codeweavers.com> Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/start/start.c | 1 - 1 file changed, 1 deletion(-) diff --git a/programs/start/start.c b/programs/start/start.c index 59fd72e07a4..2199f3b034f 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -641,7 +641,6 @@ done: HANDLE hJob; JOBOBJECT_EXTENDED_LIMIT_INFORMATION info; - SetConsoleCtrlHandler(NULL, TRUE); hJob = CreateJobObjectA(NULL, NULL); /* Create a job where the child is associated... if the start.exe terminates * before the child, the job will be terminated, and the child will be terminated as well. -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3290
set as draft, as I wonder if we shouldn't terminate start for a gui app and not wait for child termination and return to the unix prompt (IIRC that's what windows does) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3290#note_38559
Some default Wine apps (namely `winecfg` and `regedit`) still don't seem to exit with this. Notepad++ does exit now though. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3290#note_38571
On Mon Jul 10 19:32:25 2023 +0000, Vladislav Timonin wrote:
Some default Wine apps (namely `winecfg` and `regedit`) still don't seem to exit with this. Notepad++ does exit now though. it does here :-( when hitting ctrl-c focus must be on console not application
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3290#note_38574
On Mon Jul 10 19:32:25 2023 +0000, eric pouech wrote:
it does here :-( when hitting ctrl-c focus must be on console not application Weird, tried a clean build just in case, still the same.
when hitting ctrl-c focus must be on console not application
Naturally. It does print `fixme:console:default_ctrl_handler Terminating process 20 on event 0`, and "releases" the console, but `winecfg`/`regedit` is still running. Using Konsole on Plasma if that happens to matter. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3290#note_38577
Jacek Caban (@jacek) commented about programs/start/start.c:
HANDLE hJob; JOBOBJECT_EXTENDED_LIMIT_INFORMATION info;
- SetConsoleCtrlHandler(NULL, TRUE);
This reverts ff7ff4d0b4deb, which would bring back bug 51766. Another possible solution would be to drop `ConsoleHandle` check from `__wine_ctrl_routine` and depend on host to deliver signal to appropriate processes. This would probably require adjusting heuristic around `setsid` in `spawn_process`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3290#note_38773
participants (4)
-
Eric Pouech -
eric pouech (@epo) -
Jacek Caban (@jacek) -
Vladislav Timonin (@vt)