git://git.onelab.eu
/
distributedratelimiting.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix mac address are truncated problem when compiling ulogd with -D_FORTIFY_SOURCE...
[distributedratelimiting.git]
/
ulogd.c
diff --git
a/ulogd.c
b/ulogd.c
index
9b998a9
..
4553d4d
100644
(file)
--- a/
ulogd.c
+++ b/
ulogd.c
@@
-769,6
+769,17
@@
int main(int argc, char* argv[])
}
}
}
}
+ if (daemonize){
+ if (fork()) {
+ exit(0);
+ }
+ if (logfile != stdout)
+ fclose(stdout);
+ fclose(stderr);
+ fclose(stdin);
+ setsid();
+ }
+
logfile_open(logf_ce.u.string);
for (p = ulogd_outputs; p; p = p->next) {
logfile_open(logf_ce.u.string);
for (p = ulogd_outputs; p; p = p->next) {
@@
-781,16
+792,6
@@
int main(int argc, char* argv[])
interh_dump();
keyh_dump();
#endif
interh_dump();
keyh_dump();
#endif
- if (daemonize){
- if (fork()) {
- exit(0);
- }
- if (logfile != stdout)
- fclose(stdout);
- fclose(stderr);
- fclose(stdin);
- setsid();
- }
/* send SIGINT to the term handler, since they hit CTRL-C */
signal(SIGINT, &sigterm_handler);
/* send SIGINT to the term handler, since they hit CTRL-C */
signal(SIGINT, &sigterm_handler);