Skip to content
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

feature(util/exec): enable process group handling on executionTimeout #16654

Closed
Gabriel-Ladzaretti opened this issue Jul 19, 2022 · 1 comment · Fixed by #17447
Closed

feature(util/exec): enable process group handling on executionTimeout #16654

Gabriel-Ladzaretti opened this issue Jul 19, 2022 · 1 comment · Fixed by #17447
Assignees
Labels
priority-2-high Bugs impacting wide number of users or very important features type:feature Feature (new functionality)

Comments

@Gabriel-Ladzaretti
Copy link
Collaborator

What would you like Renovate to be able to do?

Blocked by

Once above is merged we should enable the PID range hack.
Context -

If you have any ideas on how this should be implemented, please tell us here.

Once above is merged
In lib/util/exec/common.ts

uncomment -

/**
     * If `pid` is negative, but not `-1`, signal shall be sent to all processes
     * (excluding an unspecified set of system processes),
     * whose process group ID (pgid) is equal to the absolute value of pid,
     * and for which the process has permission to send a signal.
     */
    // process.kill(-(cp.pid as number), signal);

and remove -

// destroying stdio is needed for unref to work
    // https://nodejs.org/api/child_process.html#subprocessunref
    // https://github.com/nodejs/node/blob/4d5ff25a813fd18939c9f76b17e36291e3ea15c3/lib/child_process.js#L412-L426
    cp.stderr?.destroy();
    cp.stdout?.destroy();
    cp.unref();
    return cp.kill(signal);

Is this a feature you are interested in implementing yourself?

Yes

@Gabriel-Ladzaretti Gabriel-Ladzaretti added type:feature Feature (new functionality) priority-2-high Bugs impacting wide number of users or very important features status:ready labels Jul 19, 2022
@Gabriel-Ladzaretti Gabriel-Ladzaretti self-assigned this Jul 19, 2022
@Gabriel-Ladzaretti Gabriel-Ladzaretti changed the title feature(util/exec): enable process group termination on timeout feature(util/exec): enable process group handling on executionTimeout Jul 19, 2022
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 32.181.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-2-high Bugs impacting wide number of users or very important features type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants