You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When synchronizing the parent and child processes using the pipe, the child might read the parent's status data before the parent is able to. I added a "sleep(1);" between the child's calls to "send_status_to_parent" and "wait_to_close" and that corrected it. The more correct solution would be to use a different mechanism for synchronization (perhaps a shared file mapping, with one entry per child denoting a state value).
The text was updated successfully, but these errors were encountered:
OH I see. The sockets get closed anyway when you kill the child process from the parent. In that case, all of the code after wait_for_close() is dead code and should be removed.
When synchronizing the parent and child processes using the pipe, the child might read the parent's status data before the parent is able to. I added a "sleep(1);" between the child's calls to "send_status_to_parent" and "wait_to_close" and that corrected it. The more correct solution would be to use a different mechanism for synchronization (perhaps a shared file mapping, with one entry per child denoting a state value).
The text was updated successfully, but these errors were encountered: