Skip to content

fixing interoperability with native child_process. also added tests #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2013

Conversation

jaredly
Copy link

@jaredly jaredly commented Aug 3, 2013

calling waitpid when it was one of node's processes caused failure. This fixes it.

Should we perhaps use another map? Is there any case where SIGCHLD would be called multiple times for a single process, such that we would set the pidMap entry, and then not pay attention to successive events?

niallo pushed a commit that referenced this pull request Aug 3, 2013
fixing interoperability with native child_process. also added tests
@niallo niallo merged commit 46e9ed3 into niallo:master Aug 3, 2013
@niallo
Copy link
Owner

niallo commented Aug 3, 2013

Thanks. Yeah in theory SIGCHLD could be called multiple times for a single child, although it's probably unlikely (child process would have to stop and then resume). Another map would work, or I think we could also set the SA_NOCLDSTOP bit in sa_flags to only receive SIGCHLD when the child exits, not when it stops.

@jaredly
Copy link
Author

jaredly commented Aug 3, 2013

although we only do the check if it's an exit. right? isn't that what res
!= 0 does?

On Sat, Aug 3, 2013 at 1:18 AM, niallo [email protected] wrote:

Thanks. Yeah in theory SIGCHLD could be called multiple times for a
single child, although it's probably unlikely (child process would have to
stop and then resume). Another map would work, or I think we could also set
the SA_NOCLDSTOP bit in sa_flags to only receive SIGCHLD when the child
exits, not when it stops.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1#issuecomment-22051092
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants