Skip to content

Add pidfd-based implementation #29

Open
@Aaron1011

Description

@Aaron1011

The current unix implementation of relies on handling SIGCHLD signals. This requires that the corresponding signal handler be properly set up - if another library in the process modifies it, it will be impossible to properly wait on child processes.

On recent versions of Linux, it's possible to use pidfds to avoid this problem. Using the libstd support (rust-lang/rust#81825), we can create a pidfd at the same time that a child is spawned. The pidfd can then be waited on using epoll or select (with an optional timeout).

See tokio-rs/tokio#4016 for additional discussion of the benefits of this approach

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions