Untitled
public php v1 · immutable /** * Daemonize the process */ if ( pcntl_fork() ){ exit(0); } posix_setsid(); if ( pcntl_fork() ){ exit(0); } // Process is now daemonized /** * Set the user permissions on the script */ $pw = posix_getpwnam('nobody'); posix_setuid($pw['uid']); posix_setgid($pw['gid']);