diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:04:33 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:04:33 +0200 |
commit | 017e56b81ba735c39c43701f737ac7dde55da7b4 (patch) | |
tree | ea7aaaee13a06a702701e2f74f5d390e10ae303e /zen/shell_execute.h | |
parent | 9.4 (diff) | |
download | FreeFileSync-017e56b81ba735c39c43701f737ac7dde55da7b4.tar.gz FreeFileSync-017e56b81ba735c39c43701f737ac7dde55da7b4.tar.bz2 FreeFileSync-017e56b81ba735c39c43701f737ac7dde55da7b4.zip |
9.5
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:") + + + + + + + + } } } } |