Differences From Artifact [15981174cd]:
- File src/main.c — part of check-in [e94621186f] at 2022-08-13 22:15:42 on branch trunk — Moved the chdir() call within enter_chroot_jail() down below the new repo name canonicalization code to allow use of relative path names. Before, you had to give an absolute path to the repo, since we'd cd'd away from that directory before we started to validate the path. (user: wyoung size: 125828) [more...]
To Artifact [52e11a5b4e]:
- File src/main.c — part of check-in [1d09e60739] at 2022-08-14 17:59:02 on branch trunk — The parent process now handles SIGTERM with an explicit exit(3) call when its PID is 1, as when it's running as "fossil server" in a Docker container. Without this, the container host's shutdown process takes a long time because it's waiting on PID 1 to die and eventually has to time out and kill it. (user: wyoung size: 126212)
| ︙ | |||
3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 | 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 | + + + + + + + + + |
}else{
fossil_set_timeout(FOSSIL_DEFAULT_TIMEOUT);
}
g.httpIn = stdin;
g.httpOut = stdout;
signal(SIGSEGV, sigsegv_handler);
signal(SIGPIPE, sigpipe_handler);
if( getpid()==1 ){
/* Modern kernels suppress SIGTERM to PID 1 to prevent root from
** rebooting the system by nuking the init system. The only way
** Fossil becomes that PID 1 is when it's running solo in a Linux
** container or similar, so we do want to exit immediately, to
** allow the container to shut down quickly.
**/
signal(SIGTERM, exit);
}
if( g.fAnyTrace ){
fprintf(stderr, "/***** Subprocess %d *****/\n", getpid());
}
g.cgiOutput = 1;
find_server_repository(2, 0);
if( fossil_strcmp(g.zRepositoryName,"/")==0 ){
allowRepoList = 1;
|
| ︙ |