VIDA-NYU / reprozip

ReproZip is a tool that simplifies the process of creating reproducible experiments from command-line executions, a frequently-used common denominator in computational science.
https://www.reprozip.org/
BSD 3-Clause "New" or "Revised" License
305 stars 34 forks source link

Don't abort on SIGINT #36

Closed remram44 closed 10 years ago

remram44 commented 10 years ago

Right now, SIGINT (ctrl+C) makes reprozip terminate (and SIGKILL every process that is still running).

Maybe it should just send a SIGINT to the first started process the first time ctrl+C is pressed.

fchirigati commented 10 years ago

But we can also terminate ReproZip in this case, right? There is no point in packaging an experiment that has been terminated anyway.

remram44 commented 10 years ago

Sonali ran into this so it should probably be fixed. My idea is that a single Ctrl+C would be delivered as normal (TODO: how is it normally delivered?), while two Ctrl+C would trigger the current behavior (kill everyone).

remram44 commented 10 years ago

Well this was pretty simple: the signal already gets delivered to the whole process group, so I don't have to do anything.

76f753c5

Pressing Ctrl+C twice (in under 2 seconds) triggers the current behavior of sending SIGKILL to every traced process.