Merge lp:~jameinel/launchpad/lp-forking-serve-cleaner-childre into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12414 |
Proposed branch: | lp:~jameinel/launchpad/lp-forking-serve-cleaner-childre |
Merge into: | lp:launchpad |
Diff against target: |
57 lines (+21/-17) 1 file modified
bzrplugins/lpserve/__init__.py (+21/-17) |
To merge this branch: | bzr merge lp:~jameinel/launchpad/lp-forking-serve-cleaner-childre |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
j.c.sackett (community) | code* | Approve | |
Review via email: mp+50031@code.launchpad.net |
Commit message
[r=jcsackett,
Description of the change
This is one step along the way to squashing bug #717345.
I finally was able to trigger the bug manually, and the first thing I noticed was if the children get interrupted at the right place, they revert to being a master process.
So this squashes all of those with a try/finally.
I think what was happening is that they were blocked trying to open their new stdin, and then SIGINT triggers them to wakeup and start exiting, and then they think they can run as a master process.
I did not add a test for it, because it requires a fair amount of trickery to stop the process at just the right time, and it is hard to detect. If we feel it is required, I might be able to put something together. (Request a fork, but don't bind to it, send it SIGINT, and make sure it exits with code 127. But I don't know how to check the return code of a process that isn't your direct child...)
John--
I can't say I'm 100% comfortable with approving this, given there's no tests. fork configurations and processes have already caused on incident report, so I think we need more confidence that this works as intended before approving it.
I'm not claiming this as a review, b/c you might find someone who knows more about the problem area and can approve this with some confidence. I do urge you to look into testing options for it; that might not be test coverage, but we should see how this code works in some fashion.