first my code

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

echo "Detached: ".posix_setsid()."\n";

for ($i=0;$i<10;$i++) {
echo "Done!\n";

I read that posix_setsid return pid on succesfull detaching. But i get
-1. I read man for setsid and this -1 mean error.

What i want is that if i run this script with automatic detaching.
But it does nothing than waiting this for to finish.

What am I doing wrong.

Uros mailto:uros.grubersir-mag.com