Mercurial > hg > orthanc
comparison Core/Toolbox.cpp @ 1491:e460341872dc
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Aug 2015 14:14:17 +0200 |
parents | 596927722403 |
children | a13581480b1f |
comparison
equal
deleted
inserted
replaced
1490:596927722403 | 1491:e460341872dc |
---|---|
1130 int pid = fork(); | 1130 int pid = fork(); |
1131 | 1131 |
1132 if (pid == -1) | 1132 if (pid == -1) |
1133 { | 1133 { |
1134 // Error in fork() | 1134 // Error in fork() |
1135 #if ORTHANC_ENABLE_LOGGING == 1 | |
1135 LOG(ERROR) << "Cannot fork a child process"; | 1136 LOG(ERROR) << "Cannot fork a child process"; |
1137 #endif | |
1138 | |
1136 throw OrthancException(ErrorCode_SystemCommand); | 1139 throw OrthancException(ErrorCode_SystemCommand); |
1137 } | 1140 } |
1138 else if (pid == 0) | 1141 else if (pid == 0) |
1139 { | 1142 { |
1140 // Execute the system command in the child process | 1143 // Execute the system command in the child process |
1150 } | 1153 } |
1151 #endif | 1154 #endif |
1152 | 1155 |
1153 if (status != 0) | 1156 if (status != 0) |
1154 { | 1157 { |
1158 #if ORTHANC_ENABLE_LOGGING == 1 | |
1155 LOG(ERROR) << "System command failed with status code " << status; | 1159 LOG(ERROR) << "System command failed with status code " << status; |
1160 #endif | |
1161 | |
1156 throw OrthancException(ErrorCode_SystemCommand); | 1162 throw OrthancException(ErrorCode_SystemCommand); |
1157 } | 1163 } |
1158 } | 1164 } |
1159 | 1165 |
1160 | 1166 |