* Attach stdin to /dev/null, otherwise qemu grabs the terminal

(unpleasant for interactive testing of the test driver).

svn path=/nixos/trunk/; revision=19209
This commit is contained in:
Eelco Dolstra 2010-01-04 16:30:26 +00:00
parent 9aa0a336bc
commit 0ecac5a6f9

View file

@ -70,6 +70,8 @@ sub start {
open LOG, "| sed --unbuffered 's|^|$name console: |'" or die;
dup2(fileno(LOG), fileno(STDOUT));
dup2(fileno(LOG), fileno(STDERR));
open NUL, "</dev/null" or die;
dup2(fileno(NUL), fileno(STDIN));
$ENV{TMPDIR} = $self->{stateDir};
$ENV{QEMU_OPTS} = "-nographic -no-reboot -redir tcp:65535::514 -net nic,vlan=1 -net socket,vlan=1,mcast=$mcastAddr";
$ENV{QEMU_KERNEL_PARAMS} = "console=ttyS0 panic=1 hostTmpDir=$ENV{TMPDIR}";