Browse files

Fix for cloudinit.d freezing terminal output

After booting launch plans with a replica_count, terminal output would stop
working and we would have to run `reset' to fix it.  It appears to be related to
subprocesses using the same standard input.  Fix it by passing /dev/null as
standard input to subprocesses.
  • Loading branch information...
1 parent 17b9191 commit d5d9c32cbfbf72cc5c499001c65b38bd28e82383 @priteau priteau committed Mar 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cloudinitd/pollables.py
View
2 cloudinitd/pollables.py
@@ -408,7 +408,7 @@ def _read_output(self, p, poll_period):
def _run(self):
cloudinitd.log(self._log, logging.DEBUG, "running the command %s" % (str(self._cmd)))
- self._p = subprocess.Popen(self._cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
+ self._p = subprocess.Popen(self._cmd, shell=True, stdin=open(os.devnull), stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
def get_command(self):
return self._cmd

0 comments on commit d5d9c32

Please sign in to comment.