Mel Flynn writes: > 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?
Because if there is one, nobody else in our group can use the app to assign IP addresses. I made it back in 1993 so that only one person could use it at a time because it adds and or deletes records from the DNS and DHCP servers. > 2) Why do stale locks occur to begin with? > 3) Do the locks really solve the problem you thought you needed them for Now, there's an excellent question. They almost never do and when they do, something very bad has happened and it needs immediate attention. It could be that somebody put the program to sleep because it hung as was recently the case or that it choked so to speak which means it abnormally ended. > 4) Why is it not possible to remove the locks if the PID that created > them is > not instance of said program? The locks are owned by root as the program runs setuid to root chmod 4755. On occasion, I find stuff I did 16 years ago and wonder, What was I thinking? I will revisit the signal handler and make it output an error message on CTRL-Z because we don't want it running if it isn't in use. Thanks for points well taken. _______________________________________________ firstname.lastname@example.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"