greyhound.php
changeset 12 b3fcc21e557f
parent 8 a8d108f37363
child 13 b5db2345c397
equal deleted inserted replaced
11:0faea3a6c881 12:b3fcc21e557f
    10  *
    10  *
    11  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    11  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    12  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    12  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    13  */
    13  */
    14 
    14 
    15 // required for signal handling to work
    15 // Try to trap termination signals to cleanly close the socket when needed
    16 declare(ticks=1);
    16 // AmaroK sends a SIGTERM when it is shut down or the user requests to stop
    17 
    17 // the script
    18 // trap SIGTERM
    18 if ( function_exists('pcntl_signal') )
    19 pcntl_signal(SIGTERM, 'sigterm');
    19 {
    20 pcntl_signal(SIGINT,  'sigterm');
    20   // required for signal handling to work
       
    21   declare(ticks=1);
       
    22   
       
    23   // trap SIGTERM
       
    24   pcntl_signal(SIGTERM, 'sigterm');
       
    25   pcntl_signal(SIGINT,  'sigterm');
       
    26 }
    21 
    27 
    22 $public = true;
    28 $public = true;
    23 $allowcontrol = true;
    29 $allowcontrol = true;
    24 $theme = 'funkymonkey';
    30 $theme = 'funkymonkey';
    25 
    31