]> git.sur5r.net Git - i3/i3/blobdiff - testcases/lib/StartXDummy.pm
lib/StartXDummy: use close STDOUT, STDERR instead of POSIX::close (Thanks mxf)
[i3/i3] / testcases / lib / StartXDummy.pm
index 36b9e0064c0d9d8ac8b3db955493223cc7d6a10a..9dfdedd29b7bcff425e9aec546b172d40d7c366f 100644 (file)
@@ -3,7 +3,6 @@ package StartXDummy;
 
 use strict;
 use warnings;
-use POSIX ();
 use Exporter 'import';
 use Time::HiRes qw(sleep);
 use v5.10;
@@ -52,8 +51,8 @@ sub start_xdummy {
         die "Could not fork: $!" unless defined($pid);
         if ($pid == 0) {
             # Child, close stdout/stderr, then start Xdummy.
-            POSIX::close(0);
-            POSIX::close(2);
+            close STDOUT;
+            close STDERR;
             # We use -config /dev/null to prevent Xdummy from using the system
             # Xorg configuration. The tests should be independant from the
             # actual system X configuration.