Re: Catching SIGHUP
| From: | Jason Greene | Date: | Thu, 11 Oct 2001 17:08:35 +0000 |
| Subject: | Re: Catching SIGHUP | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-67786@lists.php.net to get a copy of this message | ||
There is documentation arriving for these functions shortly, but the basic method
of creating a signal handler with pcntl follows:
function my_sig_function() {
// Do something neat
}
pcntl_signal(SIGHUP, "my_sig_function");
// Wait around for a while
sleep(10);
// If you want to set it back to the default call
pcntl_signal(SIGHUP, SIG_DFL);
-Jason
----- Original Message -----
From: "Edin Kadribasic" <edink@proventum.net>
To: "Markus Fischer" <mfischer@guru.josefine.at>; "Richard Lynch"
<ceo@l-i-e.com>
Cc: <php-dev@lists.php.net>
Sent: Thursday, October 11, 2001 5:53 AM
Subject: Re: [PHP-DEV] Catching SIGHUP
> > On Wed, Oct 10, 2001 at 11:38:44PM -0500, Richard Lynch wrote :
> > > Is it just impossible cuz PHP doesn't have try/catch error-handling?
> >
> > try/catch has nothing to do with signal handlers. By first bet is
> > that ist just not imlpemented to call a php function when a
> > signal occurs .... guess we'll have to implement it (at least for
> > cgi ;)
>
> Take a look at (very experimental) ext/pcntl. It let's you specify signal
> handlers.
>
> Edin
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>