Skip to content

Commit

Permalink
Correctly use the user id.
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc d'Anterroches committed Dec 22, 2011
1 parent faa2d30 commit 501a7df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.pyc
5 changes: 3 additions & 2 deletions lib/worker.py
Expand Up @@ -75,7 +75,7 @@ def Configure(self, cfg):

self.args = cfg.get("args", [])
self.cwd = cfg.get("cwd", "/")
self.user = cfg.get("user", None)
self.user = cfg.get("user", "nobody")

self.chroot = cfg.get("chroot", None)
self.restart = cfg.get("restart", True)
Expand Down Expand Up @@ -170,7 +170,8 @@ def Start(self):
logging.debug("Pid for StartDaemon is %s." % pid_file)
logging.debug("Env for %s is %s." % (self.name, self.env))
self.pid = utils_process.StartDaemon(my_cmd, self.env, self.cwd,
pidfile=pid_file)
pidfile=pid_file, uid=self.uid,
gid=self.gid)
if self.daemon:
logging.debug("Application %s is a daemon." % self.name)
# Here the launched command will again fork and write to
Expand Down

0 comments on commit 501a7df

Please sign in to comment.