I need to collect output from a rather finicky program in my script. The program will occasionally hang and otherwise be annoying.
I'm calling it with the backtick operator (functionally equivalent to shell_exec).
All I want to do is put some sort of timeout on this call.
As it stands, if I intentionally hang the program (remove the stored password from the server), the page just hangs and hangs, starting up 3 processes on the server
php.exe
CMD.exe
and the executable I've called
All protected so I can't even kill the buggers by hand.
So, can I timeout the backtick, or is there some other good workaround to this problem, it seems like the kind of thing which would be useful.
the PHP.exe service does eventually kill itself (after way too long), but the other two are sticking around... assumbably waiting for a password, without anyway out.
-Rob
I'm calling it with the backtick operator (functionally equivalent to shell_exec).
All I want to do is put some sort of timeout on this call.
As it stands, if I intentionally hang the program (remove the stored password from the server), the page just hangs and hangs, starting up 3 processes on the server
php.exe
CMD.exe
and the executable I've called
All protected so I can't even kill the buggers by hand.
So, can I timeout the backtick, or is there some other good workaround to this problem, it seems like the kind of thing which would be useful.
the PHP.exe service does eventually kill itself (after way too long), but the other two are sticking around... assumbably waiting for a password, without anyway out.
-Rob