From owner-cvs-src@FreeBSD.ORG Thu Oct 20 05:12:23 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org 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 9CE3616A41F; Thu, 20 Oct 2005 05:12:23 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58FF743D5A; Thu, 20 Oct 2005 05:12:23 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9K5CMHw061649; Thu, 20 Oct 2005 05:12:23 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9K5CM7G061648; Thu, 20 Oct 2005 05:12:22 GMT (envelope-from njl) Message-Id: <200510200512.j9K5CM7G061648@repoman.freebsd.org> From: Nate Lawson Date: Thu, 20 Oct 2005 05:12:21 +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/usr.sbin/powerd powerd.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 05:12:23 -0000 njl 2005-10-20 05:12:20 UTC FreeBSD src repository Modified files: usr.sbin/powerd powerd.c Log: Set the signal handlers before creating the thread. This is so it inherits the parent's signal mask. Once daemon() forked, signals would be ignored in the child thread. While I'm here, check the return value of daemon(). This fixes termination in the daemon case (bug introduced in last commit). Noticed by: Frederik Lindberg Revision Changes Path 1.14 +15 -4 src/usr.sbin/powerd/powerd.c