the logic of which FDs to propagate to be kept at the place where the FD is created - likely a totally different piece of code to that which does the fork/exec The code that calls fork()/exec() ought ...
The actual permissions that result are complicated by the fact that the process has a default permissions mask - umask. The effective permissions are given by mode & ~umask which means that the bits ...