Re: exit function

From: Date: Fri, 20 Oct 2000 16:27:19 +0000
Subject: Re: exit function
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-21420@lists.php.net to get a copy of this message
The described below would, needless to say, kick butt. I would say that about 50% of my coding PHP is in a shell environment. As my scripts get more and more complicated I would like to see more functions that are shell specific (like what is described below). Just my $0.02 --Joe On Fri, Oct 20, 2000 at 11:13:35AM +0300, Teodor Cimpoesu wrote: > Hi Rasmus! > On Thu, 19 Oct 2000, Rasmus Lerdorf wrote: > > > Ah right, missed the CGI angle of your question. It is only for the > > module version. So no, there is no way to do it with PHP. > maybe a posix_{sigaction|signal}() function to accept PHP functions > as signal handlers? > > ^C is SIGTERM iirc, so one would `emulate' register_shutdown_function() > with something like: > function sigterm_hook ($int) { echo 'clean-up';} > posix_signal(SIGTERM, "sigterm_hook"); > > -- teodor > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /*****************************\ * Joe Stump * * www.Care2.com * * Office: 650.328.0198 * * Extension: 122 * \*****************************/ http://www.miester.org/Joe/Stump/Joe_Stump_resume.html -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$ N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@ 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)! ------END GEEK CODE BLOCK------

« previous php.general (#21420) next »