toil icon indicating copy to clipboard operation
toil copied to clipboard

can't ctrl-c toil

Open gijzelaerr opened this issue 5 years ago • 2 comments

What is the proper way to kill toil?

If I ctrl-c a cwl toil (3.19.0) run it keeps on going. For now i'm using:

$ ps ax | grep toil | awk '{ print $1 }' | xargs kill

in a different console, but there must be a better way?

┆Issue is synchronized with this Jira Story ┆friendlyId: TOIL-40

gijzelaerr avatar Mar 29 '19 12:03 gijzelaerr

This is a known issue that needs to be address in the code:

http://www.regexprn.com/2010/05/killing-multithreaded-python-programs.html

I always used create threads with daemon = True approach.

In the mean time you can also ctrl-z toil it and kill %1

Gijs Molenaar [email protected] writes:

What is the proper way to kill toil?

If I ctrl-c a cwl toil run it keeps on going. For now i'm using:

$ ps ax | grep toil | awk '{ print $1 }' | xargs kill

in a different console, but there must be a better way?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.*

diekhans avatar Mar 29 '19 13:03 diekhans

In what PR was this fixed?

mr-c avatar Oct 27 '20 18:10 mr-c

It looks like we set up a SIGTERM handler in #3779 which is at https://github.com/DataBiosphere/toil/blame/b5abd3c6565cee88edde94eb5546fa85909adbc3/src/toil/common.py#L928.

I think this ought to be working now, for cases where the Toil main thread is actually available to receive the signal and none of the other threads are hung.

adamnovak avatar Oct 26 '22 21:10 adamnovak