[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] pidfile cleanup
From: |
Eric Anderson |
Subject: |
Re: [Monotone-devel] pidfile cleanup |
Date: |
Fri, 25 Aug 2006 10:57:59 -0700 |
Nathaniel Smith writes:
> [ ignored the set a flag approach to signal handling because there
> could exist paths that would miss the signal ]
Somthing that just occurred to me, you could in the signal handler set
the flag, and also set a timer signal to occur in the future. If the
timer signal arrives with the flag set, monotone would exit with a
warning about an unclean exit, and forces the exit. If the exception
is thrown before the timer signal, then proper cleanup would happen.
It seems this would give you the same reliability as you have now with
an increased chance of getting a clean exit.
-Eric