Moved the log rotation code out of the signal handler and into it's own
function. The signal handler now simply sets a flag which is monitored inside the thread_main_loop() function. The log rotation code has also been tightened to handle any error conditions better. Credit to Petr Lampa for suggesting that system functions inside of a signal handler is bad magic.
This commit is contained in:
1 parent
6a588826c1
commit
5822ec3d44
6 files changed
+95
-55
No files matched your search
+2
-1
@@ -1,4 +1,4 @@
|
||||
/* $Id: utils.h,v 1.14 2002-04-15 02:07:27 rjkaes Exp $
|
||||
/* $Id: utils.h,v 1.15 2002-04-18 16:57:06 rjkaes Exp $
|
||||
*
|
||||
* See 'utils.h' for a detailed description.
|
||||
*
|
||||
@@ -49,6 +49,7 @@ extern size_t strlcpy(char *dst, const char *src, size_t size);
|
||||
#endif /* HAVE_STRLCPY */
|
||||
|
||||
extern size_t chomp(char *buffer, size_t length);
|
||||
extern void rotate_log_files(void);
|
||||
|
||||
/*
|
||||
* The following is to allow for better memory checking.
|
||||
|
||||
Reference in new issue
Block a user