Lines Matching refs:os
23 import os # Miscellaneous OS interfaces.
37 if (hasattr(os, "devnull")):
38 REDIRECT_TO = os.devnull
47 if not workDir is None and os.path.isdir(workDir):
56 pid = os.fork()
64 os.setsid()
104 pid = os.fork() # Fork a second child.
112 os.chdir(WORKDIR)
115 os.umask(UMASK)
118 os._exit(0) # Exit parent (the first child) of the second child.
127 os._exit(0) # Exit parent of the first child.
163 os.close(fd)
174 os.open(REDIRECT_TO, os.O_RDWR) # standard input (0)
177 os.dup2(0, 1) # standard output (1)
178 os.dup2(0, 2) # standard error (2)
203 """ % (retCode, os.getpid(), os.getppid(), os.getpgrp(), os.getsid(0),
204 os.getuid(), os.geteuid(), os.getgid(), os.getegid())