lib/StartXDummy: use close STDOUT, STDERR instead of POSIX::close (Thanks mxf)
This commit is contained in:
parent
3f76522344
commit
c8eb7b08ac
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue