From 017e56b81ba735c39c43701f737ac7dde55da7b4 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Wed, 9 May 2018 00:04:33 +0200 Subject: 9.5 --- zen/shell_execute.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'zen/shell_execute.h') 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(command)); } else - runAsync([=] { int rv = ::system(command.c_str()); (void)rv; }); + { + runAsync([=] { int rv = ::system(command.c_str()); (void)rv; }); + + warn_static("finish:") + + + + + + + + } } } } -- cgit