<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Courier [Adobe]'; font-size:10pt; font-weight:400; font-style:normal;">Hello,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I had the same problem as Jan Rekorajski with syslog-ng 3.0.1 and 2.0.10:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>&gt; Hi,<br>
&gt; Syslog-ng 3.0.1 dies on reload (kill -HUP pid) when config file contains<br>
&gt; log { destination { program() } }  directive set. 100% repeatable.<br>
&gt; <br>
&gt; Here are the relevant config lines:<br>
&gt; <br>
&gt; destination d_sshguard  { program("/usr/sbin/sshguard -a 6"); };<br>
&gt; # A desperate experiment<br>
&gt; #destination d_sshguard  { program("read"); };<br>
&gt; <br>
&gt; log { source(s_sys); filter(f_authpriv);        destination(d_sshguard); };<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>pstree revealed that the command /usr/sbin/sshguard was run by a shell (in my case pdksh). To make the shell go out of my way I've put exec before /usr/sbin/sshguard . See my syslog-ng.conf :<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>destination d_sshguard { program("exec /usr/sbin/sshguard" template("$DATE $FULLHOST $MESSAGE\n")); }<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Since I've changed this and restarted syslog-ng, it survives killing it with HUP, now. <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Furthermore, pstree revealed that killing syslog-ng with HUP makes it restart sshguard. Bazsi suggested that some pocess sends either SIGINT or SIGTERM to syslog-ng's process group. In my opinion it is the shell to do that. When syslog-ng reloads its configuration it destroys FIFO to sshguard. This action awakes the shell and triggers it to send some destructive signal to its process group.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Regards,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- <br>
Bartosz Lis @ Institute of Comp. Science, Technical University of Lodz, Poland<br>
   bartoszl @ ics.p.lodz.pl</p></body></html>