-
Notifications
You must be signed in to change notification settings - Fork 44
Description
To reproduce, run the ControlDllTestbed project, it would open a terminal on startup, now press the Choice button. This kills the active terminal in the control and spawns a new one. The old one briefly appears as a large window.
The code executed is:
if(!_process.HasExited)
BeginGuiMacro("Close").WithParam(1 /*terminate active process*/).WithParam(1 /*without confirmation*/).ExecuteSync();
if(!_process.HasExited)
_process.Kill();
So it sends ConEmu a graceful request, waits for the GuiMacro to complete executing, and then kills the process in case it still has failed to process the graceful request (as we want to be 100% sure not to leave stale processes behind, especially in a long-running app).
Interestingly, if the last Kill line is removed, then it closes smoothly. But I believe the code should try to be as reliable as possible, so the Kill is nice to have there.
Is it that the GuiMacro exits before completing the work fully? Can it be adjusted?
cc @Maximus5