All pastes #337362 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-02 18:55 UTC
rendered paste body
	function daemon() 
	{
		$child = pcntl_fork();
   		if($child) 
		{
       		       exit;
   		}
   		posix_setsid();
   		chdir("/");
   		umask(0);
   		return posix_getpid();
	}