Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Mar 2003 16:10:54 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Martin Blapp <mbr@FreeBSD.org>
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>
In-Reply-To: <200303232333.h2NNXx0v090231@repoman.freebsd.org>
References:  <200303232333.h2NNXx0v090231@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Martin Blapp <mbr@FreeBSD.org> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030324001054.GA48996>