I am writing a Perl script that will write some inputs and send those inputs to an external program. There is a small but non-zero chance that this program will hang, and I want to time it out:
This question already has answers here: How to run my iPhone application once a while even the user doesn't open the app? [closed]