Skip to content

syscall: use pipe2 on GNU/Linux for O_CLOEXEC #2656

@ianlancetaylor

Description

@ianlancetaylor
On GNU/Linux os.Pipe should use the pipe2 system call when available, passing in
O_CLOEXEC.  pipe2 is new as of Linux kernel version 2.6.27.  This can avoid a call to
syscall.ForkLock.RLock.  Also should use pipe2 in syscall.ForkExec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeSuggestedIssues that may be good for new contributors looking for work to do.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions