You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests in batch mode under flx, a control-C from the keyboard fails to stop the batch. Instead, it is intercepted by the test case which is running as a process, and that process is terminated, instead of the whole batch. This is extremely annoying! I regularly kill the whole terminal to stop the tests (which means I lose the terminal log).
There's probably an issue with threads as well. There is some basic ctrl-C handling in src/packages/program.fdoc.
However the batch mode issue is probably more closely related to detecting the result of a shell process. If the shell process is terminated by a Ctrl-C, at least under posix, the return code indicates this. If the shell process is run with a "propagate ctrl-C" option, the caller should issue a ctrl-C signal to terminate its containing process.
It may also be appropriate to think about how we might use Posix or Windows to tell the shell process to ignore a Ctrl-C and force it to be handled by the parent process. The parent could then kill the child shell process.
One half way reasonable system is to distinguish "kill current process" from "kill whole process tree". I have seen two ways to do that. Method 1 was that a single Ctrl-C kills the running (child) process but not the parent, but two Ctrl-C given very quickly in a row kill the parent as well. The other method is two distinct signals from the keyboard, one to kill the running process and one to kill the lot. I think MSDOS had this (Ctrl-C vs Ctrl-Reset or something).
There's also an issue with "ignore Ctrl-C", as opposed to "block the signal temporarily".
Any which way, there should be a way to stop a batch test run other than killing the controlling terminal.
The text was updated successfully, but these errors were encountered:
When running tests in batch mode under flx, a control-C from the keyboard fails to stop the batch. Instead, it is intercepted by the test case which is running as a process, and that process is terminated, instead of the whole batch. This is extremely annoying! I regularly kill the whole terminal to stop the tests (which means I lose the terminal log).
There's probably an issue with threads as well. There is some basic ctrl-C handling in src/packages/program.fdoc.
However the batch mode issue is probably more closely related to detecting the result of a shell process. If the shell process is terminated by a Ctrl-C, at least under posix, the return code indicates this. If the shell process is run with a "propagate ctrl-C" option, the caller should issue a ctrl-C signal to terminate its containing process.
It may also be appropriate to think about how we might use Posix or Windows to tell the shell process to ignore a Ctrl-C and force it to be handled by the parent process. The parent could then kill the child shell process.
One half way reasonable system is to distinguish "kill current process" from "kill whole process tree". I have seen two ways to do that. Method 1 was that a single Ctrl-C kills the running (child) process but not the parent, but two Ctrl-C given very quickly in a row kill the parent as well. The other method is two distinct signals from the keyboard, one to kill the running process and one to kill the lot. I think MSDOS had this (Ctrl-C vs Ctrl-Reset or something).
There's also an issue with "ignore Ctrl-C", as opposed to "block the signal temporarily".
Any which way, there should be a way to stop a batch test run other than killing the controlling terminal.
The text was updated successfully, but these errors were encountered: