Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Wouldn't this cause confusion if "each hook process" includes the child processes it creates?
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.
On Thu, Dec 10, 2015 at 10:55:18PM -0800, Qiang Huang wrote:
What sort of confusion? If the hook wants to explicitly launch a
daemon or some such, I'm fine with:
—
hook 1: spawn ------> reaped
daemon------------------------------------------->
hook 2: spawn --> reaped
hook 3: spawn --> reaped
If folks are worried about hook-children surviving an early hook exit:
—
hook 1: spawn ------(died)-> reaped
child------------------------------------------->
hook 2: spawn --> reaped
hook 3: spawn --> reaped
we can require the runtime to be more shell-like and make a new
process group to contain the hooks (but this will start getting pretty
complicated).
Without some sort of rule about reaping, I don't see much gain to the
“Hooks MUST be called in the listed order” requirement. If they're
all spawned one after the other, you don't have any guarantees that
earlier hooks will have accomplished their task before later hooks are
run.
It might be easier to just separate ‘create’ (most of the container
setup) from ‘exec’ (process launch and possible PID namespace
creation) and ‘destroy’ (remove anything left-over from ‘create’) and
get out of the hook business altogether [1,2,3].
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.
I think we should take out
reaped
from the suggested change.