Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PPRZ CENTER] Fixed detection of child processes exitting on Mac OS.
We are now checking if the input channel is empty when receiving the IN callback. If that is the case we assume that the child process exitted, ond call the close process callback that normally is treggered by the HUP callback. Some background: On OS X glib is using it's own implementation of poll that does not generate the HUP signal. (It would be possible to add this functionality modelled after the SSH implementation of bsd_poll) The glib implementation does generate IN signal when the pipe get's closed. So we can just check if the input channel is empty and if that is the case infer that the pipe got closed.
- Loading branch information
Showing
1 changed file
with
26 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters