From owner-cvs-src-old@FreeBSD.ORG Mon Aug 30 23:26:35 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71D6710656AE for ; Mon, 30 Aug 2010 23:26:35 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5FDFE8FC16 for ; Mon, 30 Aug 2010 23:26:35 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o7UNQZRK058305 for ; Mon, 30 Aug 2010 23:26:35 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o7UNQZIP058304 for cvs-src-old@freebsd.org; Mon, 30 Aug 2010 23:26:35 GMT (envelope-from pjd@repoman.freebsd.org) Message-Id: <201008302326.o7UNQZIP058304@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to pjd@repoman.freebsd.org using -f From: Pawel Jakub Dawidek Date: Mon, 30 Aug 2010 23:26:10 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/hastd Makefile hast.h hastd.c primary.c secondary.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 23:26:35 -0000 pjd 2010-08-30 23:26:10 UTC FreeBSD src repository Modified files: sbin/hastd Makefile hast.h hastd.c primary.c secondary.c Log: SVN rev 212038 on 2010-08-30 23:26:10Z by pjd Because it is very hard to make fork(2) from threaded process safe (we are limited to async-signal safe functions in the child process), move all hooks execution to the main (non-threaded) process. Do it by maintaining connection (socketpair) between child and parent and sending events from the child to parent, so it can execute the hook. This is step in right direction for others reasons too. For example there is one less problem to drop privs in worker processes. MFC after: 2 weeks Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com Revision Changes Path 1.5 +1 -1 src/sbin/hastd/Makefile 1.6 +2 -0 src/sbin/hastd/hast.h 1.16 +34 -10 src/sbin/hastd/hastd.c 1.27 +20 -19 src/sbin/hastd/primary.c 1.12 +17 -4 src/sbin/hastd/secondary.c