X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=authserver%2Fauthd%2Fauthd.php;h=912e12b084f9cf634c0b994ffc8661d1099f057a;hp=edd750e2cb9d3b27d93ee281e64f7f4072d0496f;hb=cced56c77764436592a7ccda33d30c57e6ee5510;hpb=e8ba559da7bf8c7ce03a69e065ef97a60b3ca7ae diff --git a/authserver/authd/authd.php b/authserver/authd/authd.php index edd750e..912e12b 100644 --- a/authserver/authd/authd.php +++ b/authserver/authd/authd.php @@ -10,6 +10,8 @@ require_once("../lib/lib.php"); //exit(0); // first we want to fork into the background like all good daemons should //$pid = pcntl_fork(); + +// uncomment this bit and comment the fork above to stop it going into the background $pid = 0; if($pid == -1) { @@ -19,6 +21,14 @@ if($pid == -1) { echo "i am a parent, i leave\n"; exit(0); } else { + // here is where i need to swithc to TCP network protocol stuff + // i must bind 127.0.0.1 though. + // what i want to happen is this: + // 1) server receives connection + // 2) server forks off process to process connection + // 3) main server continues. + // a forked process thingy should be fully self contained and capable of dealing + // with "problems", i.e. the parent doesnt want to have to clean up children global $MSG_QUEUE_KEY_ID_SERVER, $MSG_QUEUE_KEY_ID_CLIENT; $cl_queue = msg_get_queue($MSG_QUEUE_KEY_ID_CLIENT, 0666 | 'IPC_CREAT');