-
Notifications
You must be signed in to change notification settings - Fork 696
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
After interrupting a build with Ctrl-C (SIGINT), cabal install just goes on to the next package #971
Comments
It looks like the information necessary to determine if a process was killed by a signal is not provided by the process library. Should probably take that up as a bug with them. |
I opened a related bug for the process library on the GHC trac. |
As a workaround for this missing functionality, can cabal use the WUE method instead? (That is: while running a subprocess, install a SIGINT handler that sets a flag; when the subprocess ends, if the flag is set, reraise the signal.) WUE is inferior to WCE, but the difference isn’t very noticable for noninteractive subprocesses. |
I believe the correct way to do this on POSIX systems is via process groups. |
The process library ticket has been closed for GHC 7.8. The library now provides the negative signal number as the exit status for terminated processes, which allows WCE to be implemented. On previous GHC versions, we could still use WUE, which is better than nothing. (@feuerbach, process groups have nothing to do with this problem. The child processes are correctly exiting with SIGINT. The bug is just that |
@andersk thanks for clarifying. But why does it ignore its own SIGINT and have to get this information indirectly through its children? |
@feuerbach, this is all explained in detail in the link I posted with the original report: http://www.cons.org/cracauer/sigint.html |
I just realized that it has to do that so as not to die when running a ghci session inside But I'll make sure to read that article. Thanks. |
Assigning to myself so that I don't forget about it, but feel free to take this ticket. |
On windows this is still the case with new-build. Edit: I missread. The issue is that it keeps building the current package but it does not continue with the next one so slightly different issue. |
closing as obsolete |
After interrupting a build with Ctrl-C (SIGINT),
cabal install
just goes on to the next package. So it takes way more Ctrl-Cs than it should to stop a runningcabal install
command. For example:This problem can be prevented by using the WCE method when launching subprocesses.
The text was updated successfully, but these errors were encountered: