Re: [cli] ^D
| From: | Marek Kilimajer | Date: | Mon, 20 Oct 2003 14:58:35 +0000 |
| Subject: | Re: [cli] ^D | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166761@lists.php.net to get a copy of this message | ||
Take a look at pcntl functions, namely pcntl_signal. But this extension is not enabled by default.
Decapode Azur wrote:
hi all, Is there a way, for a cli script, to detect Ctrl_D or Ctrl_Z ? My cli php script runs a loop while(1) and I would like to find a way to stop it from a user action. (Waiting a better solution I've made: if(file_exists('./stop')) and type the command >stop to stop the script. I can not use readline cause this would break the loop.) thanks