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?
In reply to Re^2: Using SIG{ALRM} within while loop.
by bliako
in thread Using SIG{ALRM} within while loop.
by evroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |