Remove base::SetAllFDsToCloseOnExec

NEW
Assigned to

Status

()

P3
normal
a year ago
17 hours ago

People

(Reporter: jld, Assigned: jld)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 affected)

Details

(Assignee)

Description

a year ago
As the comments around it point out, base::SetAllFDsToCloseOnExec is inherently racy: another thread can create a non-close-on-exec fd after that function is called and before the spawn, which would then leak a copy into the child.  APIs to create fds with the close-on-exec bit already set aren't always portable, and in practice aren't used consistently even when there is a standard.

Currently, SetAllFDsToCloseOnExec is used by process_util_bsd and process_util_mac, because they use posix_spawn rather than fork and can't ru code to iterate open file descriptors in the forked child; I'll file platform-specific bugs for them.
(Assignee)

Updated

a year ago
Depends on: 1400051
(Assignee)

Updated

a year ago
Depends on: 1400061

Updated

a year ago
Priority: -- → P3
(Assignee)

Updated

17 hours ago
Assignee: nobody → jld
You need to log in before you can comment on or make changes to this bug.