lib/Pagon/ChildProcess.php
protected function signalHandlerDefault($signal)
    {
        switch ($signal) {
            case SIGTERM:
            case SIGINT:
                // Check children
                while ($this->children) {
                    foreach ($this->children as $child) {
                        $ok = $child->kill(SIGINT);
                        /* EPERM */
                        if (posix_get_last_error() == 1) $ok = false;

                        if ($ok) {
                            // Emit exit
                            $child->emit('abort', $signal);
                            $child->shutdown($signal);
                            $this->clear($child);
                        }
                    }
                }
                $this->emit('abort', $signal);
                $this->shutdown($signal);
                exit;
                break;
        }
    }
protected function signalHandlerDefault($signal)
    {
        switch ($signal) {
            case SIGTERM:
            case SIGINT:
                // Check children
                while ($this->children) {
                    foreach ($this->children as $child) {
                        $ok = $child->kill(SIGINT);
                        /* EPERM */
                        if (posix_get_last_error() == 1) $ok = false;

                        if ($ok) {
                            // Emit exit
                            $child->emit('abort', $signal);
                            $child->shutdown($signal);
                            $this->clear($child);
                        }
                    }
                }
                $this->emit('abort', $signal);
                $this->shutdown($signal);
                exit;
                break;
        }
    }
protected function signalHandlerDefault ( $ signal ) { switch ( $ signal ) { case SIGTERM : case SIGINT : // Check children while ( $ this -> children ) { foreach ( $ this -> children as $ child ) { $ ok = $ child -> kill ( SIGINT ) ; /* EPERM */ if ( posix_get_last_error ( ) == 1 ) $ ok = false ; if ( $ ok ) { // Emit exit $ child -> emit ( 'abort' , $ signal ) ; $ child -> shutdown ( $ signal ) ; $ this -> clear ( $ child ) ; } } } $ this -> emit ( 'abort' , $ signal ) ; $ this -> shutdown ( $ signal ) ; exit ; break ; } }
Default signal handler

@param int $signal
Default signal handler