File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
sys_opt/multiple_process/src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,8 @@ int main(int argc, char *argv[]) {
174174 }
175175
176176 // Need to wait for all child process to complete
177+ std::cout << " \n [PID: " << getpid () << " ] PARENT WAITS CHILD TO FINISH.\n\n "
178+ << std::endl;
177179 for (int i = 0 ; i < iter; i++) {
178180 int status = 0 ;
179181 int child = wait (&status);
@@ -183,8 +185,6 @@ int main(int argc, char *argv[]) {
183185 if (WEXITSTATUS (status) and WIFEXITED (status))
184186 result = false ;
185187 }
186- std::cout << " \n [PID: " << getpid () << " ] PARENT WAITS CHILD TO FINISH.\n\n "
187- << std::endl;
188188
189189 std::cout << " TEST " << ((result) ? " PASSED" : " FAILED" ) << std::endl;
190190 return ((result) ? EXIT_SUCCESS : EXIT_FAILURE);
You can’t perform that action at this time.
0 commit comments