Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Is there a way to first try the 'clean' timeout, and if it does not work, use the 'dirty' way? For example timeout -s 9 2 timeout 1 myscript - after 1 second kill with sigterm, after 2 seconds kill with -9. Will this work? Commented Mar 11, 2019 at 14:14
  • Yes that should work. As you guess the outer timeout will intervene 1 second after the inner (softer) one tries. Commented Mar 11, 2019 at 14:32