Mercurial > masqmail-0.2
annotate src/md5/global.h @ 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 | 08114f7dcc23 |
children |
rev | line source |
---|---|
0 | 1 /* GLOBAL.H - RSAREF types and constants |
2 */ | |
3 | |
4 /* PROTOTYPES should be set to one if and only if the compiler supports | |
5 function argument prototyping. | |
6 The following makes PROTOTYPES default to 0 if it has not already | |
7 been defined with C compiler flags. | |
8 */ | |
9 #ifndef PROTOTYPES | |
10 #define PROTOTYPES 0 | |
11 #endif | |
12 | |
13 /* POINTER defines a generic pointer type */ | |
14 typedef unsigned char *POINTER; | |
15 | |
16 /* UINT2 defines a two byte word */ | |
17 typedef unsigned short int UINT2; | |
18 | |
19 /* UINT4 defines a four byte word */ | |
20 typedef unsigned long int UINT4; | |
21 | |
22 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. | |
23 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it | |
24 returns an empty list. | |
25 */ | |
26 #if PROTOTYPES | |
27 #define PROTO_LIST(list) list | |
28 #else | |
29 #define PROTO_LIST(list) () | |
30 #endif |