Skip to content

Commit 68edaa2

Browse files
committed
- Implemented: Catch SIGHUP signal for log rotation (LarsForum)
1 parent fcfc0cb commit 68edaa2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

History.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Version 2.xxx (xxxx 2015)
7272
- Changed: Windows serial port Enumeration (now also supports windows 10)
7373
- Implemented: Thermosmart Thermostat
7474
- Implemented: Option for Dummy device to create Soil Moisture,Leaf Wetness, RGB Switch
75+
- Implemented: Catch SIGHUP signal for log rotation (LarsForum)
7576

7677
Version 2.2563 (June 14th 2015)
7778
- Implemented: WebServer, native SSL and keep-alive, big thanks to chimit!!!!

main/domoticz.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ void daemonize(const char *rundir, const char *pidfile)
217217
sigaction(SIGSEGV, &newSigAction, NULL); // catch segmentation fault signal
218218
sigaction(SIGABRT, &newSigAction, NULL); // catch abnormal termination signal
219219
sigaction(SIGILL, &newSigAction, NULL); // catch invalid program image
220-
220+
#ifndef WIN32
221+
sigaction(SIGHUP, &newSigAction, NULL); // catch HUP, for logrotation
222+
#endif
223+
221224
/* Fork*/
222225
pid = fork();
223226

0 commit comments

Comments
 (0)