ctrl_c_handler() vs. cygrunsrv shutdown handling problem

Jason Tishler jason@tishler.net
Thu May 29 21:25:00 GMT 2003


On Thu, May 29, 2003 at 01:25:50PM -0400, Christopher Faylor wrote:
> On Thu, May 29, 2003 at 01:12:36PM -0400, Jason Tishler wrote:
> >I'm willing to work up a patch to fix this problem properly.
> >Unfortunately, the only solution I can think of is a new CYGWIN
> >setting.  Is this acceptable?  If not, any other ideas?
> 
> Why not add an option to have cygrunsrv set SIGTERM to SIG_IGN?

I already tried the above in one of my many failed attempts to fix this
in cygrunsrv.  AFAICT, this won't work because the daemon will (re)set
signal handling to meet its needs.  In the case of PostgreSQL's
postmaster, the following occurs:

    1. cygrunsrv sets SIGTERM to SIG_IGN
    2. postmaster inherits that SIGTERM is ignored
    3. postmaster sets its SIGTERM (and other signal) handling during
       initialization
    4. postmaster responds to the first signal sent during system
       shutdown
    5. postmaster takes too long to shut down possibly corrupting the
       database

Any other ideas?

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6



More information about the Cygwin-developers mailing list