Date: Mon, 7 Jun 2010 10:44:12 +0100 (BST) From: Christopher Key <cjk32@cam.ac.uk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/147645: audio/squeezeboxserver should reopen logs on SIGHUP Message-ID: <201006070944.o579iC56020181@chacal.wzl33> Resent-Message-ID: <201006070950.o579o344029846@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 147645 >Category: ports >Synopsis: audio/squeezeboxserver should reopen logs on SIGHUP >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 07 09:50:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Christopher Key >Release: FreeBSD 8.0-RELEASE-p2 amd64 >Organization: >Environment: System: FreeBSD chacal.wzl33 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #1: Thu Apr 1 21:31:00 BST 2010 root@chacal.wzl33:/usr/obj/usr/src/sys/CHACAL-DEBUG amd64 >Description: Currently Squeezebox Server reopens its log files upon receiving SIGUSR1, whereas the newsyslog.conf entry causes SIGHUP to be sent. As Squeezebox Server can be verbose in its logging, the lack of log rotation can lead to /var becoming full quickly. Changing Squeezebox Server to respond to SIGHUP (rather than changing the signal sent by newsyslog) seems the most appropriate solution, maintaining compatibilty with FreeBSD standards. It also avoids the need for the install script to correct an existing entry in newsyslog.conf. >How-To-Repeat: >Fix: The attached patch implements the above changes. --- patch-Slim-Utils-Log.pm begins here --- --- Slim/Utils/Log.pm 2010-04-01 13:21:54.000000000 +0100 +++ Slim/Utils/Log.pm 2010-06-07 09:08:34.000000000 +0100 @@ -134,7 +134,7 @@ # Make sure recreate option is set if user has an existing log.conf if ( !main::ISWINDOWS && !$ENV{NYTPROF} ) { $config{'log4perl.appender.server.recreate'} = 1; - $config{'log4perl.appender.server.recreate_check_signal'} = 'USR1'; + $config{'log4perl.appender.server.recreate_check_signal'} = 'HUP'; } # Change to syslog if requested @@ -985,7 +985,7 @@ if ( !main::ISWINDOWS && !$ENV{NYTPROF} ) { $defaultAppenders{server}->{recreate} = 1; - $defaultAppenders{server}->{recreate_check_signal} = 'USR1'; + $defaultAppenders{server}->{recreate_check_signal} = 'HUP'; } return $class->_fixupAppenders(\%defaultAppenders); --- patch-Slim-Utils-Log.pm ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006070944.o579iC56020181>