Commit Briefs

Omar Polo

initialize the logger early

Initialize the logger as soon as possible and log by default to stderr. With this, some (common?) errors are printed early instead of ending up in syslog. # NB: this is in configless mode % ./gmid -p 80 [2021-07-07 11:05:57] bind: Address already in use % ./gmid -p 81 [2021-07-07 11:13:53] bind: Permission denied %


Omar Polo

refactor add_{cflags,ldflags}


Omar Polo

add --enable-sandbox

patch from Anna "CyberTailor" It's handy for helpers like ebuild's use_enable. (the sandbox is still always enabled by default)


Omar Polo

check libimsg too

patch from Anna "CyberTailor"


Omar Polo

always append LDFLAGS and CFLAGS

Initial patch from Anna "CyberTailor", tweaked by me (drop guessing_* and always append CFLAGS)



Omar Polo

try to preserve as much as possible CFLAGS and LDFLAGS from env

but still try to autodetect with pkg-config if they aren't provided. Passing CFLAGS/LDFLAGS from the command line will still override the guessed ones.


Omar Polo

explain the OpenBSD bit


Omar Polo

don't log too much by default


Omar Polo

test macro expansion too


Omar Polo

show macro usage in the example


Omar Polo

fmt


Omar Polo

fmt


Omar Polo

gracefully shut down fastcgi backends

we need to delete the events associated with the backends, otherwise the server process won't ever quit. Here, we add a pending counter to every backend and shut down immediately if they aren't handling any client; otherwise we try to close them as soon as possible (i.e. when they close the connection to the last connected client.)


Omar Polo

don't let CGI scripts inherit our stderr

our stderr could have been sent to the logger process, so it may be invalid. Furthermore, in the future we may want to capture also the stderr of the processes.