Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl-C failure #105

Open
skaller opened this issue Sep 28, 2017 · 0 comments
Open

Ctrl-C failure #105

skaller opened this issue Sep 28, 2017 · 0 comments
Assignees

Comments

@skaller
Copy link
Member

skaller commented Sep 28, 2017

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.

@skaller skaller self-assigned this Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant