()
| 417 | maybe_drop_privileges(uid=uid, gid=gid) |
| 418 | |
| 419 | def after_chdir_do(): |
| 420 | # Since without stderr any errors will be silently suppressed, |
| 421 | # we need to know that we have access to the logfile. |
| 422 | logfile and open(logfile, 'a').close() |
| 423 | # Doesn't actually create the pidfile, but makes sure it's not stale. |
| 424 | if pidfile: |
| 425 | _create_pidlock(pidfile).release() |
| 426 | |
| 427 | return DaemonContext( |
| 428 | umask=umask, workdir=workdir, fake=fake, after_chdir=after_chdir_do, |
nothing calls this directly
no test coverage detected