static bool containMakeFdsCOEProc(struct nsjconf_t *nsjconf)
{
- int dirfd = open("/proc/self/fd", O_DIRECTORY|O_RDONLY|O_CLOEXEC);
- if (dirfd == -1) {
- PLOG_D("open('/proc/self/fd', O_DIRECTORY|O_RDONLY)");
- return false;
- }
+ int dirfd = open("/proc/self/fd", O_DIRECTORY | O_RDONLY | O_CLOEXEC);
+ if (dirfd == -1) {
+ PLOG_D("open('/proc/self/fd', O_DIRECTORY|O_RDONLY)");
+ return false;
+ }
DIR *dir = fdopendir(dirfd);
if (dir == NULL) {
PLOG_W("fdopendir(fd=%d)", dirfd);
- close(dirfd);
+ close(dirfd);
return false;
}
/* Make all fds above stderr close-on-exec */
}
/* Will be used inside the child process only, so it's save to have it in BSS */
-static uint8_t subprocCloneStack[128 * 1024]; /* 128 KiB */
+static uint8_t subprocCloneStack[128 * 1024]; /* 128 KiB */
/* Cannot be on the stack, as the child's stack pointer will change after clone() */
static __thread jmp_buf env;