]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Because it is very hard to make fork(2) from threaded process safe (we are
authorpjd <pjd@FreeBSD.org>
Mon, 30 Aug 2010 23:26:10 +0000 (23:26 +0000)
committerpjd <pjd@FreeBSD.org>
Mon, 30 Aug 2010 23:26:10 +0000 (23:26 +0000)
commit9b4ae63e7877da8b244dc4d6076cc57bc2f0ef20
tree245f35c3193bdea89cf47c51960dd52a809d5f8e
parent8a7b72b9d3f5a419b8558fe232480453f6c4c070
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
sbin/hastd/Makefile
sbin/hastd/hast.h
sbin/hastd/hastd.c
sbin/hastd/primary.c
sbin/hastd/secondary.c