projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Things to ignore...
[tinc]
/
src
/
process.c
diff --git
a/src/process.c
b/src/process.c
index
8f9f01a
..
3e3cd93
100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: process.c,v 1.
2 2002/04/09 15:26:00
zarq Exp $
+ $Id: process.c,v 1.
4 2002/04/13 11:07:12
zarq Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-27,11
+27,11
@@
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
-#include <syslog.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
+#include <syslog.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
@@
-46,6
+46,7
@@
#include "device.h"
#include "connection.h"
#include "device.h"
#include "device.h"
#include "connection.h"
#include "device.h"
+#include "logging.h"
#include "system.h"
#include "system.h"
@@
-66,7
+67,9
@@
extern int do_purge;
void memory_full(int size)
{
void memory_full(int size)
{
- syslog(LOG_ERR, _("Memory exhausted (couldn't allocate %d bytes), exitting."), size);
+ log(0, TLOG_ERROR,
+ _("Memory exhausted (couldn't allocate %d bytes), exitting."),
+ size);
cp_trace();
exit(1);
}
cp_trace();
exit(1);
}
@@
-189,8
+192,10
@@
cp
if(!write_pid(pidfilename))
return -1;
}
if(!write_pid(pidfilename))
return -1;
}
-
+
openlog(identname, LOG_CONS | LOG_PID, LOG_DAEMON);
openlog(identname, LOG_CONS | LOG_PID, LOG_DAEMON);
+ log_add_hook(log_syslog);
+ log_del_hook(log_default);
if(debug_lvl > DEBUG_NOTHING)
syslog(LOG_NOTICE, _("tincd %s (%s %s) starting, debug level %d"),
if(debug_lvl > DEBUG_NOTHING)
syslog(LOG_NOTICE, _("tincd %s (%s %s) starting, debug level %d"),