subproc: comments
This commit is contained in:
parent
fbf5b76ef8
commit
6e21eaa0da
1
Makefile
1
Makefile
@ -152,4 +152,3 @@ subproc.o: util.h
|
||||
user.o: user.h common.h log.h subproc.h util.h
|
||||
util.o: util.h common.h log.h
|
||||
uts.o: uts.h common.h log.h
|
||||
config.pb-c.o: config.pb-c.h
|
||||
|
@ -375,7 +375,9 @@ static bool subprocInitParent(struct nsjconf_t *nsjconf, pid_t pid, int pipefd)
|
||||
return true;
|
||||
}
|
||||
|
||||
static uint8_t subprocCloneStack[PTHREAD_STACK_MIN * 2];
|
||||
/* 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 */
|
||||
/* Cannot be on the stack, as the child's stack pointer will change after clone() */
|
||||
static __thread jmp_buf env;
|
||||
|
||||
static int subprocCloneFunc(void *arg __attribute__ ((unused)))
|
||||
@ -385,7 +387,7 @@ static int subprocCloneFunc(void *arg __attribute__ ((unused)))
|
||||
}
|
||||
|
||||
/*
|
||||
* Avoid problems with caching of PID/TID in glibc - when using syscall(__NR_clone) glibc will
|
||||
* Avoid problems with caching of PID/TID in glibc - when using syscall(__NR_clone) glibc doesn't
|
||||
* not update internal PID/TID caches, which can lead to invalid values returned by getpid(),
|
||||
* or wrong PID/TIDs being used in raise()/abort() functions
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user