open returns the child's PID on success. You can use kill along with this PID to end the process.
That leaves you with waiting for 20 seconds. alarm is one way to go.
In reply to Re: how to kill subprocess when it goes longer than 20 seconds?
by ikegami
in thread how to kill subprocess when it goes longer than 20 seconds?
by echoangel911
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |