unshare: fix data race#2254
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
lgtm (for what it is worth.) |
|
LGTM once the lint issue is fixed. |
on errors, kill immediately the child process and release the used resources. Closes: containers#2221 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
1ea98c9 to
3e5684d
Compare
|
CI is green now |
|
/lgtm |
| } | ||
|
|
||
| // If the function fails from here, we need to make sure the | ||
| // child process is killed and properly cleaned up. |
There was a problem hiding this comment.
Is this code not using PR_SET_PDEATHSIG? It's always a good idea IMO.
There was a problem hiding this comment.
I had to drop PR_SET_PDEATHSIG in the past: 10caa2a
PR_SET_PDEATHSIG would work only if we lock the current thread, and it is difficult to say how the caller is going to use it, or if it is invoked from a goroutine
on errors, kill immediately the child process and release the used resources.
Closes: #2221