From 7b580b488cb60ce4166ef2539496e83385779aa7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 7 Sep 2010 23:54:15 +0100 Subject: bitbake/bitbake-runtask: Ensure signals to the parent don't pass to the children directly Signed-off-by: Richard Purdie --- bitbake/bin/bitbake-runtask | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/bin') diff --git a/bitbake/bin/bitbake-runtask b/bitbake/bin/bitbake-runtask index dee25cd..cd033d1 100755 --- a/bitbake/bin/bitbake-runtask +++ b/bitbake/bin/bitbake-runtask @@ -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() -- cgit v1.1