1
0
Fork 0

fix attempt

This commit is contained in:
Jan Steemann 2014-10-14 10:27:11 +02:00
parent b68c7c6a9a
commit f09e440539
1 changed files with 5 additions and 2 deletions

View File

@ -293,7 +293,7 @@ static void StartExternalProcess (TRI_external_t* external, bool usePipes) {
return; return;
} }
LOG_DEBUG("fork succeeded, child pid: %d", (int) processPid); LOG_INFO("fork succeeded, child pid: %d", (int) processPid);
if (usePipes) { if (usePipes) {
close(pipe_server_to_child[0]); close(pipe_server_to_child[0]);
@ -999,7 +999,9 @@ TRI_external_status_t TRI_CheckExternalProcess (TRI_external_id_t pid,
else { else {
opts = WNOHANG | WUNTRACED; opts = WNOHANG | WUNTRACED;
} }
res = waitpid(external->_pid, &loc, opts); res = waitpid(external->_pid, &loc, opts);
if (res == 0) { if (res == 0) {
if (wait) { if (wait) {
status._errorMessage = status._errorMessage =
@ -1029,8 +1031,9 @@ TRI_external_status_t TRI_CheckExternalProcess (TRI_external_id_t pid,
} }
else if (res == -1) { else if (res == -1) {
TRI_set_errno(TRI_ERROR_SYS_ERROR); TRI_set_errno(TRI_ERROR_SYS_ERROR);
LOG_WARNING("waitpid returned error for pid %d: %s", LOG_WARNING("waitpid returned error for pid %d (%d): %s",
(int) external->_pid, (int) external->_pid,
(int) wait,
TRI_last_error()); TRI_last_error());
status._errorMessage = status._errorMessage =
std::string("waitpid returned error for pid ") + std::string("waitpid returned error for pid ") +