<!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:'Lucida Console'; font-size:9pt; font-weight:400; font-style:normal;">On Donnerstag, 26. November 2009, Torben Friese wrote:<br>
&gt; [..]<br>
&gt; Another interesting thing is if you bring in a log at line 205<br>
&gt; (daemonize.c) it is working:<br>
&gt;<br>
&gt;         LM_ERR("what ever \n");<br>
&gt;         for (r=3; r &lt; 32; r++){<br>
&gt;                 close(r);<br>
&gt;         }<br>
&gt;<br>
&gt; It seems that close() is not able to close the fd for the log (return<br>
&gt; value from mksock in syslog_async.c).<br>
&gt;<br>
&gt; But If I let the for-loop counter start at 4 it is still not working.<br>
&gt;<br>
&gt; After that I tried to set up log_fd as global( int log_fd=-1) and<br>
&gt; include the headers, to check the "r" against the log_fd before execute<br>
&gt; close(). But the same result.<br>
&gt;<br>
&gt; Also a correct close(closelog_async()) in deamonize do not work.<br>
&gt;<br>
&gt; I am open for any ideas, maybe I have oversight something. Could you<br>
&gt; reproduce this ?<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>Hello Torben,<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've just was able to reproduce this on 1.5 branch.<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>henning@ca:~/projects/openser/branches/1.5$ ./kamailio -V<br>
version: kamailio 1.5.3-notls (i386/linux)<br>
flags: STATISTICS, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<br>
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, PKG_SIZE 4194304<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
svnrevision: 2:5958M<br>
@(#) $Id: main.c 5608 2009-02-13 16:48:17Z henningw $<br>
main.c compiled on 00:29:27 Dec  1 2009 with gcc 4.3.3<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>Here i get log file output, regardsless if i use log_stderror or not, but only with debug=3.<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>Dec  1 00:33:47 [7985] INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected)<br>
Dec  1 00:33:47 [7987] ERROR:core:main: install asynchronous syslog handler..                       <br>
Dec  1 00:33:47 [7987] NOTICE:core:main: version: kamailio 1.5.3-notls (i386/linux)   <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>The second log msg was added from me, to see if the correct function is called.<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>This is on a kubuntu 9.04, with version 1.5-5ubuntu3 of sysklogd. <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>When i use debug=2 in the cfg, aparently it not works.. Interesting, i'll investigate more.<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>Henning</p></body></html>