lib/StartXDummy: use close STDOUT, STDERR instead of POSIX::close (Thanks mxf)

This commit is contained in:
Michael Stapelberg 2011-11-07 23:39:45 +00:00
parent 3f76522344
commit c8eb7b08ac
1 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,6 @@ package StartXDummy;
use strict; use strict;
use warnings; use warnings;
use POSIX ();
use Exporter 'import'; use Exporter 'import';
use Time::HiRes qw(sleep); use Time::HiRes qw(sleep);
use v5.10; use v5.10;
@ -52,8 +51,8 @@ sub start_xdummy {
die "Could not fork: $!" unless defined($pid); die "Could not fork: $!" unless defined($pid);
if ($pid == 0) { if ($pid == 0) {
# Child, close stdout/stderr, then start Xdummy. # Child, close stdout/stderr, then start Xdummy.
POSIX::close(0); close STDOUT;
POSIX::close(2); close STDERR;
# We use -config /dev/null to prevent Xdummy from using the system # We use -config /dev/null to prevent Xdummy from using the system
# Xorg configuration. The tests should be independant from the # Xorg configuration. The tests should be independant from the
# actual system X configuration. # actual system X configuration.