From owner-freebsd-questions@FreeBSD.ORG Wed Jun 10 16:28:24 2009 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2413E1065686 for <freebsd-questions@freebsd.org>; Wed, 10 Jun 2009 16:28:24 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (dc.cis.okstate.edu [139.78.103.93]) by mx1.freebsd.org (Postfix) with ESMTP id DB74F8FC0C for <freebsd-questions@freebsd.org>; Wed, 10 Jun 2009 16:28:23 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (localhost.cis.okstate.edu [127.0.0.1]) by dc.cis.okstate.edu (8.14.2/8.13.8) with ESMTP id n5AGSEOF031566 for <freebsd-questions@freebsd.org>; Wed, 10 Jun 2009 11:28:14 -0500 (CDT) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <200906101628.n5AGSEOF031566@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org Date: Wed, 10 Jun 2009 11:28:14 -0500 From: Martin McCormick <martin@dc.cis.okstate.edu> Subject: Re: Control-Z the Sleep Signal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 10 Jun 2009 16:28:24 -0000 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.