2

timeout is nice for killing a command that does not complete within n seconds.

Is there a similar command to kill a command that has not printed anything on stdout for n seconds (and which therefore is probably stuck)?

Edit:

socat -T120 'exec:python3 /Users/Name/Desktop/pythoncode.py' -

works nice, except it does not set $? if the job is killed. Is there a way I can make socat do that?

Ole Tange
  • 35,514

0 Answers0