On Fri, Jan 14, 2011 at 13:28, Kai Renz <writeme...@googlemail.com> wrote:

    (Putting this back on the list.  Please use Reply-All.)

> @Daniel:
> Yeh i tried sending it to the background, this works but still it does
> wait for the other script to finish.

    It shouldn't.  In fact, just to see if I somehow completely forgot
how things worked, I just mocked up the following and verified it
worked perfectly:

<?php
// 1.php
`php ./2.php >> /dev/null 2>&1 &`;

echo 'I will now terminate, while the other script continues.'.PHP_EOL;
?>

<?php
// 2.php
while (1) {

        file_put_contents('./123-whee.txt','I\'m still 
running!'.PHP_EOL,FILE_APPEND);

}
?>

dan@blackbox:~$ php 1.php
I will now terminate, while the other script continues.
dan@blackbox:~$ tail -f ./123-whee.txt
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
I'm still running!
^C
dan@blackbox:~$ ps -ef | grep -i php
dan      29428     1 34 13:37 pts/166  00:00:24 php ./2.php
dan      29491 28729  0 13:38 pts/166  00:00:00 grep --color=auto -i php

-- 
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to