detaching

This is a discussion on detaching within the PHP General forums, part of the PHP Programming Forums category; Hello! first my code #!/usr/local/bin/php -q <?php echo "Detached: ".posix_setsid()."\n"; for ($...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-08-2003
Uros Gruber
 
Posts: n/a
Default detaching

Hello!

first my code

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

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

for ($i=0;$i<10;$i++) {
sleep(3);
}
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.


--
lp,
Uros mailto:uros.gruber@sir-mag.com

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:57 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0