-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add the killing of children #668
Conversation
Kills children processes when parent process receives a signal to shutdown. Solves for sanic-org#594
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this doesn't work. To illustrate, the below can be app.py:
from sanic import Sanic
from sanic.response import json
app = Sanic(__name__)
@app.route("/")
async def test(request):
return json({"test": True})
app.static('/', './')
if __name__ == '__main__':
app.run(host="0.0.0.0", port=8000, workers=3)
then kill the lowest number process (find it with ps aux | grep app.py
). You can see the others are still running (again with ps aux | grep app.py
.
No with this you send a sigint to the parent process as originally stated
in the issue
…On Thu, Apr 27, 2017, 7:54 PM Raphael Deem ***@***.***> wrote:
***@***.**** commented on this pull request.
Unfortunately this doesn't work. To illustrate, the below can be app.py:
from sanic import Sanic
from sanic.response import json
app = Sanic(__name__)
@app.route("/")
async def test(request):
return json({"test": True})
app.static('/', './')
if __name__ == '__main__':
app.run(host="0.0.0.0", port=8000, workers=3)
then kill the lowest number process (find it with ps aux | grep app.py).
You can see the others are still running (again with ps aux | grep app.py.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#668 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABnz1z8iPdEbhxcNaXPqUXEmjqpfnAXlks5r0VTZgaJpZM4NK7jZ>
.
|
This is what I meant by the lowest number process listed in |
I thought this was working a long time ago 👿 |
Are you sure you're killing the parent process? When I did it with an |
derp, i was sending a kill signal not int. |
nice title btw, much like the god cronos |
You know how I do :D |
Kills children processes when parent process receives a signal to
shutdown.
Solves for #594