I'm starting to use s6 to manage long-running processes on my servers -- so far, with great success. One of these services is PostgreSQL.
PostgreSQL can be terminated gracefully by sending it SIGTERM, SIGINT, or SIGQUIT. Each is handled differently: with TERM, the server waits for all sessions to disconnect before it shuts down the database; with INT, it forcefully disconnects all current sessions and then shuts down the database; and with QUIT, it terminates the database without doing a checkpoint and graceful shutdown at all. So what I'd like to do is have "s6-svc -d" result in the process receiving SIGINT and SIGCONT to the supervised process, rather than SIGTERM and SIGCONT. It doesn't seem like there's a way to do this. Or am I missing something? It looks like there is a mechanism to do that kind of signal remapping in s6-svscan, using the -s option, but the documentation for servicedirs doesn't mention anything like that. If I'm right and there's no easy way to do that, it's not necessarily a huge problem -- currently I'm just using "s6-svc -iO" to shut down PostgreSQL, and I can keep doing that; or, alternatively, I can patch PostgreSQL to switch the behavior of TERM and INT. But if there *is* a way to get s6-svc to behave differently, I'm interested! Cheers, Brett -- Brett Neumeier (bneume...@gmail.com)