On Wednesday 10 June 2009 00:49:16 per...@pluto.rain.com wrote:
> Martin McCormick <mar...@dc.cis.okstate.edu> wrote:
> >     Thanks to all. In this case, I made SIGTSTP have the
> > same effect in the program that CTRL-C does (SIGINT) so now
> > either signal makes the application remove the lock and quit
> > gracefully.
>
> To each his own, I guess.  To anyone familiar with the usual
> Unix/Linux conventions, this response to ^Z is going to be
> thoroughly unexpected.  Is there any reasonable way to do
> only the minimum cleanup need for the lock to be safely
> removed, and then suspend, reacquiring the lock when resumed?

Agreed. You're solving the wrong problem by mapping CTRL-Z to CTRL-C. The 
questions you should be asking are:
1) Why are stale locks bad for the app?
2) Why do stale locks occur to begin with?
3) Do the locks really solve the problem you thought you needed them for to 
begin with?
4) Why is it not possible to remove the locks if the PID that created them is 
not instance of said program?
-- 
Mel
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to