Created on 2008-03-01.19:17:30 by SamB, last changed 2017-07-30.23:31:19 by gh.
msg3703 (view) |
Author: SamB |
Date: 2008-03-01.19:17:29 |
|
When I type ^C during a darcs trackdown operation, instead of aborting the
operation, it just kills the test program. This is not nice.
http://www.cons.org/cracauer/sigint.html seems to explain what should be done
instead.
|
msg3733 (view) |
Author: droundy |
Date: 2008-03-03.17:18:54 |
|
I've read http://www.cons.org/cracauer/sigint.html, and it does look like we
should behave better. I can't help but wonder, however, if this code ought to
be part of System.Process? Simon? Basically, the idea is that when we call an
external command we should:
"Look at WIFSIGNALED(status) and WTERMSIG(status) to tell whether the child says
'I exited on SIGINT: in my opinion the user wants the shellscript to be
discontinued'"
As far as I can see, whenever System.Process gets a positive result to the above
tests (which isn't too clear to me), it ought to raise a sigINT in the current
program. This would allow programs to not need to add special logic when
calling external programs, just because they want to respond to ctrl-C if it's
hit while the process is running.
Anyhow, I thought I'd run this by you (Simon), to see if you have thoughts on
the question. The above web page is definitely an interesting read.
David
|
msg4546 (view) |
Author: simonmar |
Date: 2008-05-07.10:55:32 |
|
> I've read http://www.cons.org/cracauer/sigint.html, and it does look like
> we
> should behave better. I can't help but wonder, however, if this code
> ought to
> be part of System.Process? Simon? Basically, the idea is that when we
> call an
> external command we should:
>
> "Look at WIFSIGNALED(status) and WTERMSIG(status) to tell whether the
> child says
> 'I exited on SIGINT: in my opinion the user wants the shellscript to be
> discontinued'"
>
> As far as I can see, whenever System.Process gets a positive result to the
> above
> tests (which isn't too clear to me), it ought to raise a sigINT in the
> current
> program. This would allow programs to not need to add special logic when
> calling external programs, just because they want to respond to ctrl-C if
> it's
> hit while the process is running.
>
> Anyhow, I thought I'd run this by you (Simon), to see if you have thoughts
> on
> the question. The above web page is definitely an interesting read.
That seems right, yes. The other side of the coin is that the GHC runtime should finish with kill(getpid(),SIGINT) if it caught SIGINT itself and cleaned up.
I'll look into this in the context of the System.Process improvements I'm working on.
Cheers,
Simon
|
msg8647 (view) |
Author: kowey |
Date: 2009-09-02.19:20:36 |
|
Hi Simon, Any chance we could get a status update on the System.Process
improvements you were planning? Perhaps a link to the GHC tracker ticket?
Thanks!
(See http://bugs.darcs.net/msg3733 for details)
|
msg8657 (view) |
Author: simonmar |
Date: 2009-09-02.21:43:29 |
|
http://hackage.haskell.org/trac/ghc/ticket/2301
GHC does now do killpid(getpid(), SIGINT) after cleaning up, if it catches a
SIGINT itself. However, the proposed changes to System.Process aren't done yet.
|
|
Date |
User |
Action |
Args |
2008-03-01 19:17:30 | SamB | create | |
2008-03-03 17:18:56 | droundy | set | status: unread -> unknown nosy:
+ simonmar messages:
+ msg3733 |
2008-05-07 10:55:35 | simonmar | set | nosy:
+ dagit messages:
+ msg4546 |
2008-05-07 12:17:28 | kowey | set | priority: bug -> not-our-bug status: unknown -> has-patch assignedto: simonmar nosy:
droundy, tommy, beschmi, kowey, dagit, SamB, simonmar |
2009-08-06 17:55:14 | admin | set | nosy:
+ markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, SamB, simonmar |
2009-08-06 20:59:13 | admin | set | nosy:
- beschmi |
2009-08-10 22:16:32 | admin | set | nosy:
+ SamB, simonmar, - markstos, darcs-devel, zooko, jast, Serware, mornfall |
2009-08-11 00:07:58 | admin | set | nosy:
- dagit |
2009-08-25 18:06:29 | admin | set | nosy:
+ darcs-devel, - simon |
2009-08-27 13:58:21 | admin | set | nosy:
tommy, kowey, darcs-devel, SamB, simonmar, thorkilnaur, dmitry.kurochkin |
2009-09-02 19:20:39 | kowey | set | nosy:
tommy, kowey, darcs-devel, SamB, simonmar, thorkilnaur, dmitry.kurochkin messages:
+ msg8647 |
2009-09-02 21:43:32 | simonmar | set | nosy:
tommy, kowey, darcs-devel, SamB, simonmar, thorkilnaur, dmitry.kurochkin messages:
+ msg8657 |
2009-10-23 22:36:34 | admin | set | assignedto: simonmar -> marlowsd nosy:
+ marlowsd |
2009-10-23 22:38:14 | admin | set | nosy:
- simonmar |
2009-10-23 23:34:44 | admin | set | assignedto: marlowsd -> simonmar nosy:
+ simonmar |
2009-10-23 23:35:07 | admin | set | nosy:
- marlowsd |
2017-07-30 23:31:19 | gh | set | status: has-patch -> given-up |
|