| 927 | } |
| 928 | #else |
| 929 | static void bootstrap_child_close_fds(void) { |
| 930 | long open_max = sysconf(_SC_OPEN_MAX); |
| 931 | if (open_max < 0 || open_max > 1048576L) { |
| 932 | open_max = 65536L; |
| 933 | } |
| 934 | for (int fd = 3; fd < open_max; fd++) { |
| 935 | (void)close(fd); |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | static void bootstrap_daemon_grandchild(const cbm_daemon_bootstrap_launch_spec_t *spec) { |
| 940 | (void)umask(077); |
no outgoing calls
no test coverage detected