Fossil SCM
Add #ifdef's to fix the Windows build.
Commit
f572f7524d453876e7f72d288ea9752dab014131107f9ac69c47982a80ac1dfc
Parent
00cc9c3eb1040c7…
1 file changed
+2
+2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -3295,10 +3295,11 @@ | ||
| 3295 | 3295 | return; |
| 3296 | 3296 | } |
| 3297 | 3297 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 3298 | 3298 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 3299 | 3299 | db_close(1); |
| 3300 | +#if !defined(_WIN32) | |
| 3300 | 3301 | if( getpid()==1 ){ |
| 3301 | 3302 | /* Modern kernels suppress SIGTERM to PID 1 to prevent root from |
| 3302 | 3303 | ** rebooting the system by nuking the init system. The only way |
| 3303 | 3304 | ** Fossil becomes that PID 1 is when it's running solo in a Linux |
| 3304 | 3305 | ** container or similar, so we do want to exit immediately, to |
| @@ -3308,10 +3309,11 @@ | ||
| 3308 | 3309 | ** They apply after the HTTP hit is handled, but this one needs |
| 3309 | 3310 | ** to be registered while we're waiting for that to occur. |
| 3310 | 3311 | **/ |
| 3311 | 3312 | signal(SIGTERM, fossil_exit); |
| 3312 | 3313 | } |
| 3314 | +#endif /* !WIN32 */ | |
| 3313 | 3315 | |
| 3314 | 3316 | /* Start up an HTTP server |
| 3315 | 3317 | */ |
| 3316 | 3318 | fossil_setenv("SERVER_SOFTWARE", "fossil version " RELEASE_VERSION |
| 3317 | 3319 | " " MANIFEST_VERSION " " MANIFEST_DATE); |
| 3318 | 3320 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3295,10 +3295,11 @@ | |
| 3295 | return; |
| 3296 | } |
| 3297 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 3298 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 3299 | db_close(1); |
| 3300 | if( getpid()==1 ){ |
| 3301 | /* Modern kernels suppress SIGTERM to PID 1 to prevent root from |
| 3302 | ** rebooting the system by nuking the init system. The only way |
| 3303 | ** Fossil becomes that PID 1 is when it's running solo in a Linux |
| 3304 | ** container or similar, so we do want to exit immediately, to |
| @@ -3308,10 +3309,11 @@ | |
| 3308 | ** They apply after the HTTP hit is handled, but this one needs |
| 3309 | ** to be registered while we're waiting for that to occur. |
| 3310 | **/ |
| 3311 | signal(SIGTERM, fossil_exit); |
| 3312 | } |
| 3313 | |
| 3314 | /* Start up an HTTP server |
| 3315 | */ |
| 3316 | fossil_setenv("SERVER_SOFTWARE", "fossil version " RELEASE_VERSION |
| 3317 | " " MANIFEST_VERSION " " MANIFEST_DATE); |
| 3318 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3295,10 +3295,11 @@ | |
| 3295 | return; |
| 3296 | } |
| 3297 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 3298 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 3299 | db_close(1); |
| 3300 | #if !defined(_WIN32) |
| 3301 | if( getpid()==1 ){ |
| 3302 | /* Modern kernels suppress SIGTERM to PID 1 to prevent root from |
| 3303 | ** rebooting the system by nuking the init system. The only way |
| 3304 | ** Fossil becomes that PID 1 is when it's running solo in a Linux |
| 3305 | ** container or similar, so we do want to exit immediately, to |
| @@ -3308,10 +3309,11 @@ | |
| 3309 | ** They apply after the HTTP hit is handled, but this one needs |
| 3310 | ** to be registered while we're waiting for that to occur. |
| 3311 | **/ |
| 3312 | signal(SIGTERM, fossil_exit); |
| 3313 | } |
| 3314 | #endif /* !WIN32 */ |
| 3315 | |
| 3316 | /* Start up an HTTP server |
| 3317 | */ |
| 3318 | fossil_setenv("SERVER_SOFTWARE", "fossil version " RELEASE_VERSION |
| 3319 | " " MANIFEST_VERSION " " MANIFEST_DATE); |
| 3320 |