def detached(logfile=None, pidfile=None, uid=None, gid=None, umask=0, workdir=None, **opts):
 if (not resource):
  raise RuntimeError('This platform does not support detach.')
 workdir = (os.getcwd() if (workdir is None) else workdir)
 signals.reset('SIGCLD')
 set_effective_user(uid=uid, gid=gid)
 (logfile and open(logfile, 'a').close())
 (pidfile and create_pidlock(pidfile))
 return DaemonContext(umask=umask, workdir=workdir)

def detached ( logfile = None , pidfile = None , uid = None , gid = None , umask = 0 , workdir = None , ** opts ) : if ( not resource ) : raise RuntimeError ( 'This platform does not support detach.' ) workdir = ( os . getcwd ( ) if ( workdir is None ) else workdir ) signals . reset ( 'SIGCLD' ) set_effective_user ( uid = uid , gid = gid ) ( logfile and open ( logfile , 'a' ) . close ( ) ) ( pidfile and create_pidlock ( pidfile ) ) return DaemonContext ( umask = umask , workdir = workdir )
detach the current process in the background .