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

fork to child process after accepting new connection request. #12

Merged
merged 2 commits into from
Jul 25, 2017

Conversation

ztbrown
Copy link
Contributor

@ztbrown ztbrown commented Jul 12, 2017

Each connection will have its own process and a crashed process will not crash the server.

Closes #4.

@ztbrown
Copy link
Contributor Author

ztbrown commented Jul 17, 2017

Whoops. This creates a bunch of zombie processes.

screen shot 2017-07-17 at 8 52 06 am

I will address in an update to this PR.

@fekberg
Copy link
Owner

fekberg commented Jul 23, 2017

Keep me posted on how it goes!

@ztbrown
Copy link
Contributor Author

ztbrown commented Jul 24, 2017

Ok, this is good to go now.

To verify forking, you can hammer reload on your browser and observe that you cannot bring down the server. Additionally, you can comment out the process reaping code and use ps to see the child processes on your machine.

To verify zombie process reaping, refresh the page a few times and then do a ps aux | grep 'Z' from your terminal. You should not see any dangling processes.

@fekberg
Copy link
Owner

fekberg commented Jul 25, 2017

Looks really good, thanks for the contribution! 👍

@fekberg fekberg merged commit 9c7d551 into fekberg:master Jul 25, 2017
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