diff -r e5f1f45ea7e2 -r 08f8a72b1f7b greyhound.php --- a/greyhound.php Fri Jun 12 13:49:22 2009 -0400 +++ b/greyhound.php Fri Jun 12 13:50:13 2009 -0400 @@ -12,7 +12,7 @@ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. */ -define('GREY_VERSION', '0.1a4'); +define('GREY_VERSION', '0.1a5'); // Try to trap termination signals to cleanly close the socket when needed // AmaroK sends a SIGTERM when it is shut down or the user requests to stop @@ -25,7 +25,6 @@ // trap SIGTERM pcntl_signal(SIGTERM, 'sigterm'); pcntl_signal(SIGINT, 'sigterm'); - pcntl_signal(SIGHUP, 'handle_refresh_signal'); } @ini_set('display_errors', 'on'); @@ -175,7 +174,10 @@ $httpd->add_handler('apple-touch-icon.png', 'file', GREY_ROOT . '/apple-touch-icon.png'); $httpd->add_handler('spacer.gif', 'file', GREY_ROOT . '/spacer.gif'); $httpd->add_handler('trans80.png', 'file', GREY_ROOT . '/trans80.png'); + $httpd->add_handler('offlinemode.png', 'file', GREY_ROOT . '/offlinemode.png'); + $httpd->add_handler('offlinemodelarge.png', 'file', GREY_ROOT . '/offlinemodelarge.png'); $httpd->threader->ipc_register('reloadconfig', 'grey_reload_config'); + $httpd->threader->ipc_register('reloadplaylist', 'rebuild_playlist_ipc'); // load all themes if forking is enabled // Themes are loaded when the playlist is requested. This is fine for // single-threaded operation, but if the playlist handler is only loaded @@ -212,14 +214,3 @@ burnout("Exception caught while running webserver:\n$e"); } -function handle_refresh_signal() -{ - global $httpd; - if ( !is_object($httpd) ) - // we're not serving yet. - return false; - - // we've got an httpd instance; rebuild the playlist - rebuild_playlist(); -} -