[cli] ^D
| From: | Decapode Azur | Date: | Mon, 20 Oct 2003 14:47:34 +0000 |
| Subject: | [cli] ^D | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-166756@lists.php.net to get a copy of this message | ||
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