masqmail-0.2

view Makefile.am @ 72:ad034b57f3b2

fixed Debian bug 536060 (log files are closed after SIGHUP receival) Explanation: When run in daemon mode, first the log files are opened. They get assigned to the file descriptors 3 and 4 usually. Then std{in,out,err} are closed. When SIGHUP comes in, all open files are closes and masqmail reexecutes itself. The new masqmail instance opens the log files at fd 0 and 1 now, but std{in,out,err} are closed afterwards, thus the log files are closed. The fix is to close the log files before std{in,out,err} are closed, in case the log files have higher fds. After std{in,out,err} were closed, the log files get opened again, now. See also: http://bugs.debian.org/536060
author meillo@marmaro.de
date Wed, 16 Jun 2010 10:32:20 +0200
parents bdef5f279fde
children 92673a185add
line source
1 EXTRA_DIST = examples docs man tpl tests misc
3 SUBDIRS = src man
5 install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir
8 conf_dir: $(DESTDIR)@with_confdir@
10 $(DESTDIR)@with_confdir@:
11 install -d $(DESTDIR)@with_confdir@
14 tpl_dir: $(DESTDIR)@datadir@/tpl
16 $(DESTDIR)@datadir@/tpl: conf_dir
17 install -d $(DESTDIR)@datadir@/masqmail/tpl
18 cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl
19 chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/*
22 doc_dir:
23 install -d $(DESTDIR)@docdir@
24 cp -r docs $(DESTDIR)@docdir@
25 cp -r examples $(DESTDIR)@docdir@
26 cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@
29 uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
30 chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
33 run_dir:
34 install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail
38 log_dir: $(DESTDIR)@with_logdir@
40 $(DESTDIR)@with_logdir@:
41 [ -d `dirname $(DESTDIR)@with_logdir@` ] || \
42 install -d `dirname $(DESTDIR)@with_logdir@`
43 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@
47 spool_dir: $(DESTDIR)@with_spooldir@
49 $(DESTDIR)@with_spooldir@:
50 [ -d `dirname $(DESTDIR)@with_spooldir@` ] || \
51 install -d `dirname $(DESTDIR)@with_spooldir@`
52 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
53 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
54 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
55 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl