in reply to eval and alarm
The code you posted works for me. I changed each system call to "system 'sleep 30'", and I commented out the &killhung calls. Otherwise it's the same code. It prints out both alarm messages, and it finishes in 20 seconds.
This reminds me of How to timeout if a call to an external program takes too long, so maybe that thread will help. If what you posted is a simplified version of what you're doing, maybe the details you left out explain the problem. See, for example, Re^9: How to timeout if a call to an external program takes too long, where an open file handle causes the program to hang even though the alarm has triggered.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: eval and alarm
by Earindil (Beadle) on Oct 02, 2007 at 16:43 UTC |