From a perl script , How can I monitor a PS which I activated and kill it within 5 minutes in case it didn't complete its tasks.
From a perl script , How can I monitor a PS which I activated and kill it within 5 minutes in case it didn't complete its tasks.
Regardless of programming language, a common arrangement is to set a SIGALRM to trigger. It's not guaranteed to trigger in exactly 5 minutes (unless you have a real-time OS like QNX) but it's usually good enough.
The perlipc manual page has some examples, as has Google, of course.
Thank You , era.