From owner-cvs-all@FreeBSD.ORG Fri Oct 12 10:38:05 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B50A116A417; Fri, 12 Oct 2007 10:38:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9814A13C44B; Fri, 12 Oct 2007 10:38:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9CAc5rv018583; Fri, 12 Oct 2007 10:38:05 GMT (envelope-from kib@repoman.freebsd.org) Received: (from kib@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9CAc5eL018582; Fri, 12 Oct 2007 10:38:05 GMT (envelope-from kib) Message-Id: <200710121038.l9CAc5eL018582@repoman.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Oct 2007 10:38:05 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libutil pidfile.3 pidfile.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2007 10:38:05 -0000 kib 2007-10-12 10:38:05 UTC FreeBSD src repository Modified files: lib/libutil pidfile.3 pidfile.c Log: When pidfile is already locked and has zero length, do not return success and zero pid from pidfile_read(). Return EAGAIN instead. Sleep up to three times for 5 ms while waiting for pidfile to be written. mount(8) does the kill(mountpid, SIGHUP). If mountd pidfile is truncated, that would result in the SIGHUP delivered to the mount' process group instead of the mountd. Found and analyzed by: Peter Holm Tested by: Peter Holm, kris Reviewed by: pjd MFC after: 1 week Revision Changes Path 1.6 +4 -0 src/lib/libutil/pidfile.3 1.8 +15 -1 src/lib/libutil/pidfile.c