]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/bitbake-runtask: Ensure signals to the parent don't pass to the children...
authorRichard Purdie <rpurdie@linux.intel.com>
Tue, 7 Sep 2010 22:54:15 +0000 (23:54 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 7 Sep 2010 22:54:15 +0000 (23:54 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/bin/bitbake-runtask

index dee25cdf276817f43df949eade69af9671404760..cd033d1590f6c8545d0377b002b99d47cd91ae6f 100755 (executable)
@@ -47,6 +47,13 @@ os.dup2(sys.stderr.fileno(), sys.stdout.fileno())
 #os.dup2(newso.fileno(), sys.stdout.fileno())
 #os.dup2(newso.fileno(), sys.stderr.fileno())
 
+# Don't read from stdin from the parent
+si = file("/dev/null", 'r')
+os.dup2(si.fileno( ), sys.stdin.fileno( ))
+
+# We don't want to see signals to our parent, e.g. Ctrl+C
+os.setpgrp()
+
 # Save out the PID so that the event can include it the
 # events
 bb.event.worker_pid = os.getpid()