in reply to Putting a timeout into a script

would sleep 360; do the job ?

Replies are listed 'Best First'.
Re^2: Putting a timeout into a script
by blazar (Canon) on May 10, 2005 at 14:26 UTC
    According to the OP's description of the problem: no, it wouldn't. For this would simply make the program sleep for that amount of seconds doing nothing else in the meantime - alarm as already pointed out is the way to go.

    Of course I imagine that one could make that work too, e.g. by forking a copy of the program that would do the sleep and then communicate the timeout to the parent with some form of IPC. But that, if possible, would just be an exercise in byzantine programming...