Skip to content
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

clarify fork semantics #531

Merged
merged 1 commit into from
Mar 12, 2015
Merged

Conversation

calid
Copy link
Contributor

@calid calid commented Mar 12, 2015

I initially read this section of the guide to mean that one should create a single context before fork, and share it across all children.

Several explosions and much reading of the mailing list archives later, I now understand that the recommendation is actually the opposite: create contexts after fork, in each child that needs to do zeromq work, and leave the parent just for process management.

After confirming with a few other individuals that the wording in the section was a little confusing, I decided to take a stab at rewording it in line with the mailing list threads I found.

Thanks!

https://lists.zeromq.org/pipermail/zeromq-dev/2011-December/014900.html
https://lists.zeromq.org/pipermail/zeromq-dev/2010-September/006089.html
https://lists.zeromq.org/pipermail/zeromq-dev/2012-October/018887.html
https://lists.zeromq.org/pipermail/zeromq-dev/2013-August/022361.html

Make it more clear that context creation should generally occur _after_
fork. Also emphasize a little more strongly that ZeroMQ work should be done
in the children, not the parent.
hintjens added a commit that referenced this pull request Mar 12, 2015
@hintjens hintjens merged commit 04b1744 into booksbyus:master Mar 12, 2015
@hintjens
Copy link
Contributor

Nice work. Sorry for the confusion.

@calid calid deleted the clarify-fork-semantics branch March 27, 2015 09:14
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