Re: [Bulk] Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?
| From: | Jean-Pierre Arneodo | Date: | Sat, 13 Jun 2009 19:53:15 +0000 |
| Subject: | Re: [Bulk] Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294019@lists.php.net to get a copy of this message | ||
Ashley Sheridan a écrit :
On Thu, 2009-06-11 at 20:52 +0200, Jean-Pierre Arneodo wrote:I don't want to stop, but the process dies. I've tried the same loop with bash interpretor. Same result, it seems to be a ubuntu problem, not a php problem. ThanksAshley Sheridan a écrit :The while loop will continue executing until its condition is false. As you've got a boolean true as the condition, it will never end. Thanks Ash www.ashleysheridan.co.ukI'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06:36) Linux ubuntu 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47 UTC 2008 x86_64 GNU/Linux Conf [php.ini] max_execution_time=0 <?php while (true) {On Thu, 2009-06-11 at 10:47 +0000, Jean-Pierre Arneodo wrote:Hi!sleep(5);} ?>
Why do you want the process to continue indefinitely? Is it for a daemonof some kind? Thanks Ash www.ashleysheridan.co.uk No, it isn't a daemon, but it does something and wait the end of processing by polling a daemon. # ulimit -a
core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 38912 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 38912 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited