All pastes #337361 Raw Edit

Something

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();
	}