Here goes a simple two-level script:
test.sh
#!/bin/bash
timeout 100 ./test-inner.sh
test-inner.sh
#!/bin/bash
sleep 100000
And, executing
./test.sh
If I try to kill test.sh process by Control+C, it does not work. Could you help me out of here?
Timeout program might had signal handler which could be configured by user with --foreground option.
As you can see at it manual page:
--foreground When not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and receive TTY signals. In this mode, children of COMMAND will not be timed out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With