in reply to Re: Using SIG{ALRM} within while loop.
in thread Using SIG{ALRM} within while loop.

see 5' EDIT with important caveat in my above post

you can also use select() with timeout to read from your command or timeout in a loop like mine which checks if command is alive. See Threads and ALARM() - There is a solution or workaround?