It's impossible to impose a timeout on code which is not aware of the timeout because it would require to ability to end that code forcefully and it's impossible to safely end code forcefully.
If you want to go down that line, your best bet it to end the entire process. If you just want to timeout molasses_in_january, then molasses_in_january would be executed in a different process than the one imposing the timeout.
In reply to Re: On timing out with ALRM
by ikegami
in thread On timing out with ALRM
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |