[mapserver-commits] [MapServer/MapServer] 2c7aed: mapserv: exit FastCGI loop promptly on SIGTERM/SIG...
github-actions[bot]
noreply at github.com
Wed May 13 07:47:24 PDT 2026
Branch: refs/heads/branch-8-6
Home: https://github.com/MapServer/MapServer
Commit: 2c7aed48d7ba342179c339afbff22c955bce86a3
https://github.com/MapServer/MapServer/commit/2c7aed48d7ba342179c339afbff22c955bce86a3
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date: 2026-05-13 (Wed, 13 May 2026)
Changed paths:
M src/apps/mapserv.c
Log Message:
-----------
mapserv: exit FastCGI loop promptly on SIGTERM/SIGUSR1 (#7506)
When mapserv is built with FastCGI and is idle inside FCGI_Accept(),
SIGTERM only sets finish_process=1 and is masked by the SA_RESTART
default of signal(), so the blocking accept()/select() resumes and the
process appears hung until the next request arrives.
Call FCGX_ShutdownPending() from the handler (signal-safe; sets
libfcgi's internal shutdown flag) and install handlers via sigaction()
with sa_flags=0 so the syscall returns EINTR. libfcgi then returns -1
from FCGI_Accept() and the loop exits cleanly.
Assisted-by: GitHub Copilot (Claude Opus 4.7)
Co-authored-by: Grant Slater <github at firefishy.com>
Co-authored-by: Even Rouault <even.rouault at spatialys.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MapServer/MapServer/settings/notifications
More information about the MapServer-commits
mailing list