Skip to content

Conversation

giuseppe
Copy link
Member

on errors, kill immediately the child process and release the used resources.

Closes: #2221

Copy link
Contributor

openshift-ci bot commented Feb 11, 2025

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hanwen-flow
Copy link
Contributor

lgtm (for what it is worth.)

@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2025

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>
@giuseppe
Copy link
Member Author

CI is green now

@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Feb 11, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 17b06dc into containers:main Feb 11, 2025
20 checks passed
@@ -167,6 +167,15 @@ func (c *Cmd) Start() error {
return err
}

// If the function fails from here, we need to make sure the
// child process is killed and properly cleaned up.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code not using PR_SET_PDEATHSIG? It's always a good idea IMO.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition in TestUnshareOOMScoreAdj
4 participants