In particular, CLONE_FS does not suggest the child process should share anThe two flags are distinct and it is impossible to correctly handle clone(2)
fd table with the parent process. In Chromewithout the assistance of fork1().
I've added a fork_req flag, FR2_SHARE_PATHS, clone(2) is used withwhich indicates that p_pd
CLONE_FSshould be treated the opposite way p_fd is (based on RFFDG flag). This is a
little ugly, but the benefit is that existing RFFDG API is preserved.
Holding FR2_SHARE_PATHS disabled, without CLONE_FILESRFFDG indicates both p_fd and p_pd are
copied, and expectswhile !RFFDG independent fd tablesicates both should be cloned.
I'm not sure whatIn Chrome, clone(2) is used with CLONE_FS, if anythingwithout CLONE_FILES, relies on the weird properties of CLONE_FS;and expects
this change might regress that functionality. This conflation wasindependent fd tables.
The previous conflation of CLONE_FS and CLONE_FILES was introduced in
introduced in r163371 (2006) without clear justification.