Skip to content

Commit

Permalink
clusterd: use unix socket for syslog
Browse files Browse the repository at this point in the history
native seems to be broken and delivers newlines into the logile
  • Loading branch information
donald committed Mar 3, 2016
1 parent 396c2dd commit dad756e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clusterd/clusterd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strict;

# https://github.molgen.mpg.de/donald/clusterd

our $REVISION='1.102';
our $REVISION='1.103';

#use lib ('/home/buczek/cluster/Donald/blib/lib');

Expand Down Expand Up @@ -1437,6 +1437,7 @@ if (defined $options{'push'}) {

if ($options{'syslog'} or not $options{'foreground'}) {
openlog('clusterd','pid','daemon');
Sys::Syslog::setlogsock('unix'); # with 'native' we get EOLs in the logfile, option "noeol" doesn't work
$SIG{__WARN__} = sub { syslog('warning',@_); };
$SIG{__DIE__} = sub { syslog('crit',@_);syslog('crit','exiting');exit 1;};
open (STDOUT,'>','/dev/null');
Expand Down

0 comments on commit dad756e

Please sign in to comment.