runqueue.py: Correctly use /dev/null as stdin

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1918 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2007-06-12 09:23:39 +00:00
parent a9947a0185
commit 25cbce31b3
1 changed files with 2 additions and 1 deletions

View File

@ -492,7 +492,8 @@ class RunQueue:
# signal.signal(signal.SIGINT, signal.SIG_IGN)
# Make the child the process group leader
os.setpgid(0, 0)
sys.stdin = open('/dev/null', 'r')
newsi = os.open('/dev/null', os.O_RDWR)
os.dup2(newsi, sys.stdin.fileno())
self.cooker.configuration.cmd = taskname[3:]
try:
self.cooker.tryBuild(fn, False)