diff options
Diffstat (limited to 'zen/shell_execute.h')
-rwxr-xr-x | zen/shell_execute.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/zen/shell_execute.h b/zen/shell_execute.h index 7dcd6653..077f18e7 100755 --- a/zen/shell_execute.h +++ b/zen/shell_execute.h @@ -39,12 +39,23 @@ void shellExecute(const Zstring& command, ExecutionType type) //throw FileError if (type == EXEC_TYPE_SYNC) { //Posix::system - execute a shell command - int rv = ::system(command.c_str()); //do NOT use std::system as its documentation says nothing about "WEXITSTATUS(rv)", ect... + const int rv = ::system(command.c_str()); //do NOT use std::system as its documentation says nothing about "WEXITSTATUS(rv)", ect... if (rv == -1 || WEXITSTATUS(rv) == 127) //http://linux.die.net/man/3/system "In case /bin/sh could not be executed, the exit status will be that of a command that does exit(127)" throw FileError(_("Incorrect command line:") + L"\n" + utfTo<std::wstring>(command)); } else - runAsync([=] { int rv = ::system(command.c_str()); (void)rv; }); + { + runAsync([=] { int rv = ::system(command.c_str()); (void)rv; }); + + warn_static("finish:") + + + + + + + + } } } } |