in reply to Re^2: Killing a system/exec/`` call if it times out
in thread Killing a system/exec/`` call if it times out
"I don't care how it's called either, system(), exec(), or backticks."Actually, yes you do (or should): see the docs for exec, taking special notes of the first paragraph:
"The "exec" function executes a system command *and never returns*; use "system" instead of "exec" if you want it to return. It fails and returns false only if the command does not exist *and* it is executed directly instead of via your system's command shell (see below)."
And the difference between system and backticks? sgifford put it clearly and succinctly ( in Re: system() vs `backtick`, q.v. ) back in 2004, when he said "backticks send the executed program's STDOUT to a variable, and system sends it to your main program's STDOUT."
But, don't quit there; read similarly re system. And re backticks... well you get the idea.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Killing a system/exec/`` call if it times out
by Cagao (Monk) on Dec 01, 2011 at 20:56 UTC |