Skip to content

Set CLOEXEC on file descriptors #1064

Description

@danth

What

Currently, when offering a service, the communication library opens several file descriptors without using CLOEXEC. This means those file descriptors remain open in a child process which was spawned using fork() and execve().

In lifecycle, we want to spawn new processes and have them connect back to a service which the parent process is providing.

We do not want to leak the existing file descriptors from the parent into the child, as this presumably would be insecure.

How

Set CLOEXEC on all file descriptors when they are opened.

Alternatively, provide a guaranteed async signal safe method for removing a service offer, which we could call after fork(). (All code between fork() and execve() must be async signal safe.)

Estimates for realization

No response

Category

  • Affects Detailed Design

Requirements / Architecture

  • Requirements / Architecture are not affected by this change?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions