freebsd-dev/sbin/hastd
Pawel Jakub Dawidek 5bdff860e7 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
2010-08-30 23:26:10 +00:00
..
activemap.c
activemap.h
control.c - Call hook on role change. 2010-08-29 21:42:45 +00:00
control.h Make control_set_role() more public. We will need it soon. 2010-08-05 19:04:29 +00:00
ebuf.c Fix typos. 2010-06-14 21:44:58 +00:00
ebuf.h
hast_proto.c Constify arguments we can constify. 2010-08-30 22:26:42 +00:00
hast_proto.h Constify arguments we can constify. 2010-08-30 22:26:42 +00:00
hast.conf.5 Execute hook when connection between the nodes is established or lost. 2010-08-30 00:31:30 +00:00
hast.h Because it is very hard to make fork(2) from threaded process safe (we are 2010-08-30 23:26:10 +00:00
hastd.8 mdoc: move remaining sections into consistent order 2010-05-13 12:08:11 +00:00
hastd.c Because it is very hard to make fork(2) from threaded process safe (we are 2010-08-30 23:26:10 +00:00
hastd.h Allow to execute specified program on various HAST events. 2010-08-27 15:16:52 +00:00
hooks.c - Add hook_fini() which should be called after fork() from the main hastd 2010-08-29 21:39:49 +00:00
hooks.h - Add hook_fini() which should be called after fork() from the main hastd 2010-08-29 21:39:49 +00:00
Makefile Because it is very hard to make fork(2) from threaded process safe (we are 2010-08-30 23:26:10 +00:00
metadata.c Plug memory leaks. 2010-06-14 21:25:20 +00:00
metadata.h
nv.c Plug memory leak. 2010-06-14 21:33:18 +00:00
nv.h
parse.y Allow to execute specified program on various HAST events. 2010-08-27 15:16:52 +00:00
pjdlog.c When logging to stdout/stderr, flush after each log. 2010-08-27 21:26:55 +00:00
pjdlog.h Problem with assertion is that it logs on stderr. Add two macros: 2010-08-05 18:26:38 +00:00
primary.c Because it is very hard to make fork(2) from threaded process safe (we are 2010-08-30 23:26:10 +00:00
proto_common.c For some setups sending data in 128kB chunks makes communication very slow. No 2010-08-18 12:09:27 +00:00
proto_impl.h Add an argument to the proto_register() function which allows protocol to 2010-08-05 17:56:41 +00:00
proto_socketpair.c When someone gives NULL as data, assume this is because he want to declare 2010-08-30 23:16:45 +00:00
proto_tcp4.c Make comment more readable. 2010-08-27 13:54:17 +00:00
proto_uds.c Assert that various buffers we are large enough. 2010-08-05 18:27:41 +00:00
proto.c Constify arguments we can constify. 2010-08-30 22:26:42 +00:00
proto.h Constify arguments we can constify. 2010-08-30 22:26:42 +00:00
rangelock.c
rangelock.h
secondary.c Because it is very hard to make fork(2) from threaded process safe (we are 2010-08-30 23:26:10 +00:00
subr.c
subr.h
synch.h Implement mtx_destroy() and rw_destroy(). 2010-08-29 21:37:21 +00:00
token.l Allow to execute specified program on various HAST events. 2010-08-27 15:16:52 +00:00