从PHP脚本启动PHP守护程序

lets say I have simple php daemon script:

#!/usr/local/bin/php -q
<?php

set_time_limit(0);

while(1){
  //do something here
  if ($something == "somethingelse"){exit;}
}

?>

And I want to run it from another php script. What's the best way to do it? I've been using the curl for that as so:

$url = "url to php daemon file";
$ch = curl_init($url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt($ch,CURLOPT_TIMEOUT, 1);
$not_important = curl_exec($ch);
curl_close($ch);

But I'm looking for a better idea, if there is one :).

shell_exec('/foo/bar/myscript.php');