[Home]

Summary:ASTERISK-13321: logger.c:531 rotate_file: system() failed for 'gzip -9 /var/log/asterisk/full.2': No child processes
Reporter:Paul Belanger (pabelanger)Labels:
Date Opened:2009-01-07 20:48:51.000-0600Date Closed:2009-01-09 10:41:29.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) logger_rotate_warnings
Description:calling 'logger rotate' from the cli for asterisk 1.6.0.3, always displays a few ugly warnings.



****** ADDITIONAL INFORMATION ******

digium1*CLI> logger rotate
[Jan  7 21:43:32] WARNING[32625]: logger.c:531 rotate_file: system() failed for 'gzip -9 /var/log/asterisk/full.2': No child processes
[Jan  7 21:43:32] WARNING[32625]: logger.c:531 rotate_file: system() failed for 'gzip -9 /var/log/asterisk/messages.2': No child processes
 == Parsing '/etc/asterisk/logger.conf':   == Found
[Jan  7 21:43:32] WARNING[32625]: logger.c:531 rotate_file: system() failed for 'gzip -9 /var/log/asterisk/event_log.2': No child processes
Asterisk Event Logger restarted
Asterisk Queue Logger restarted
Comments:By: Paul Belanger (pabelanger) 2009-01-07 20:53:14.000-0600

I'm not sure I ever noticed the warnings on previous version, but here is the setting in our logger.conf which is responsible.

[general]
exec_after_rotate=gzip -9 ${filename}.2



By: Matthew Nicholson (mnicholson) 2009-01-08 13:05:52.000-0600

I was able to reproduce this.  I'll investigate it.

By: Matthew Nicholson (mnicholson) 2009-01-08 15:40:32.000-0600

Ok, you can ignore this error, the command should still run.  The error is caused by a custom SIGCHLD handler as far as I can tell.  Also there is another problem in that the system() command is being used instead of the ast_safe_system() call (which also happens to reset the signal handlers).  I'll post a patch shortly.

By: Digium Subversion (svnbot) 2009-01-09 10:32:27.000-0600

Repository: asterisk
Revision: 168014

U   trunk/main/logger.c

------------------------------------------------------------------------
r168014 | mnicholson | 2009-01-09 10:32:27 -0600 (Fri, 09 Jan 2009) | 5 lines

Use ast_safe_system() in logger.c instead of system()

(closes issue ASTERISK-13321)
Reported by: pabelanger

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168014

By: Digium Subversion (svnbot) 2009-01-09 10:41:21.000-0600

Repository: asterisk
Revision: 168015

_U  branches/1.6.1/
U   branches/1.6.1/main/logger.c

------------------------------------------------------------------------
r168015 | mnicholson | 2009-01-09 10:41:21 -0600 (Fri, 09 Jan 2009) | 12 lines

Merged revisions 168014 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r168014 | mnicholson | 2009-01-09 10:32:34 -0600 (Fri, 09 Jan 2009) | 5 lines
 
 Use ast_safe_system() in logger.c instead of system()
 
 (closes issue ASTERISK-13321)
 Reported by: pabelanger
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168015

By: Digium Subversion (svnbot) 2009-01-09 10:41:29.000-0600

Repository: asterisk
Revision: 168016

_U  branches/1.6.0/
U   branches/1.6.0/main/logger.c

------------------------------------------------------------------------
r168016 | mnicholson | 2009-01-09 10:41:29 -0600 (Fri, 09 Jan 2009) | 12 lines

Merged revisions 168014 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r168014 | mnicholson | 2009-01-09 10:32:34 -0600 (Fri, 09 Jan 2009) | 5 lines
 
 Use ast_safe_system() in logger.c instead of system()
 
 (closes issue ASTERISK-13321)
 Reported by: pabelanger
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168016