1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00
freebsd/sbin/hastd/Makefile
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

42 lines
829 B
Makefile

# $FreeBSD$
.include <bsd.own.mk>
PROG= hastd
SRCS= activemap.c
SRCS+= control.c
SRCS+= ebuf.c event.c
SRCS+= hast_proto.c hastd.c hooks.c
SRCS+= metadata.c
SRCS+= nv.c
SRCS+= secondary.c
SRCS+= parse.y pjdlog.c primary.c
SRCS+= proto.c proto_common.c proto_socketpair.c proto_tcp4.c proto_uds.c
SRCS+= rangelock.c
SRCS+= subr.c
SRCS+= token.l
SRCS+= y.tab.h
MAN= hastd.8 hast.conf.5
CFLAGS+=-I${.CURDIR}
CFLAGS+=-DINET
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
# This is needed to have WARNS > 1.
CFLAGS+=-DYY_NO_UNPUT
DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
.if ${MK_OPENSSL} != "no"
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
CFLAGS+=-DHAVE_CRYPTO
.endif
YFLAGS+=-v
CLEANFILES=y.tab.c y.tab.h y.output
.include <bsd.prog.mk>