From owner-cvs-src Sun Mar 23 16:10:56 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B857A37B401; Sun, 23 Mar 2003 16:10:54 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DDFC43F75; Sun, 23 Mar 2003 16:10:54 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 3AF202ED3DA; Sun, 23 Mar 2003 16:10:54 -0800 (PST) Date: Sun, 23 Mar 2003 16:10:54 -0800 From: Alfred Perlstein To: Martin Blapp Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/contrib/isc-dhcp/client dhclient.c Message-ID: <20030324001054.GA48996@elvis.mu.org> References: <200303232333.h2NNXx0v090231@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200303232333.h2NNXx0v090231@repoman.freebsd.org> User-Agent: Mutt/1.4i Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Martin Blapp [030323 15:34] wrote: > mbr 2003/03/23 15:33:59 PST > > FreeBSD src repository > > Modified files: (Branch: RELENG_4_8) > contrib/isc-dhcp/client dhclient.c > Log: > MFC rev. 1.25 > > We don't have cat(1) and kill(1) on the miniroot disks. > > This fix will be committed to the ISC repo later, but for now > take this file out of the vendor tree. This is ok, but just doing this: pidfd = fopen(path_dhclient_pid, "r"); if (pidfd != NULL && fscanf(pidfd, "%d", &oldpid) == 1 && oldpid && kill(oldpid, SIGKILL) == 0) unlink(path_dhclient_pid); if (pidfd != NULL) fclose(pidfd); should be enough. sorry, this actually started as just testing the result of scanf against '1' instead of both '0' and 'EOF'. :) -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message