Hi all,
OK sorry, the variable "r" is re-set in the for-loop, my fault(better think before write ;-) ).
But the loop is the problem in my opinion.
If I put a LM_* log direct in fron of the close(line208 in daemonize.c), everything seems fine. Which means the close command fails (maybe at the right fd).
regards Torben
Am Freitag, den 20.11.2009, 12:14 +0100 schrieb Torben Friese:
Hi all,
I have a problem with the DSYSLOG_ASYNC option in the Makefile.defs
If I have set this option I could not longer receive log messages in the "normal" running mode (forking, debug level=2 stderr = no).
If I set the debug to 9 I receive logging messages, then via $kamctl debug 2 is everything fine.
If the debug is set to 2 and I run the proxy in foreground I also receive log messages.
Any way, I have tried to find out what is going wrong here and found something in :
daemonize.c
At the end of the daemonize function is a for loop
int daemonize(int * own_pgid) . . /* close any open file descriptors 32 is the maximum number of inherited open file descriptors */ for (r=3; r < 32; r++){ close(r); } . .
The variable "r" is used for the return value of fprintf (Upon successful return, these functions return the number of characters printed ..).
At the moment I have no idea why this triggering this error and only for the DSYSLOG_ASYNC option.
Furthermore why or for what is this for-loop good ?
Maybe I am totally wrong or off the track but I really want this async logging.
best regards
Torben
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev