daemon: Use /dev/null for stdin when running state hooks.
This commit is contained in:
parent
23f7995eab
commit
6dbec302e3
1 changed files with 2 additions and 2 deletions
|
@ -301,8 +301,8 @@ class Session(object):
|
|||
stdout = None
|
||||
stderr = None
|
||||
try:
|
||||
check_call(["/bin/sh", filename], stdout=stdout,
|
||||
stderr=stderr, close_fds=True,
|
||||
check_call(["/bin/sh", filename], stdin=open(os.devnull, 'r'),
|
||||
stdout=stdout, stderr=stderr, close_fds=True,
|
||||
cwd=self.sessiondir, env=self.getenviron())
|
||||
except Exception, e:
|
||||
self.warn("Error running hook '%s' for state %s: %s" %
|
||||
|
|
Loading…
Reference in a new issue