Skip to content

Commit 42dc8c6

Browse files
committed
Minor correction
1 parent d362ab0 commit 42dc8c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys_opt/multiple_process/src/host.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ int main(int argc, char *argv[]) {
180180
std::cout << "[PID: " << getpid() << "] child: " << child
181181
<< " exited with WIFEXITED: " << WIFEXITED(status)
182182
<< " and WEXITSTATUS: " << WEXITSTATUS(status) << std::endl;
183-
if (WEXITSTATUS(status))
183+
if (WEXITSTATUS(status) and WIFEXITED(status))
184184
result = false;
185185
}
186186
std::cout << "\n[PID: " << getpid() << "] PARENT WAITS CHILD TO FINISH.\n\n"

0 commit comments

Comments
 (0)