Re: SEGINT, readline extension & clean script exit - how to do it

From: Date: Wed, 29 Nov 2006 19:14:48 +0000
Subject: Re: SEGINT, readline extension & clean script exit - how to do it
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-245301@lists.php.net to get a copy of this message
On Tue, November 28, 2006 7:25 am, Jochem Maas wrote: > so the question is how can I use readline() and handle the SIGINT > gracefully whilst not waiting > for readline() to return control to my script? I'm just guessing here, but you probably don't. You could, howver, write your own PHP function similar to readline, only without whatever is in readline that ignores/buffers signals. You'd want something like an fread($x, 1) on a non-blocking stream, and then build up the string character by character, until you get a newline. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#245301) next »