- Use File::Spec->devnull() to get the null device path.
Prior to this change we used NUL for Windows native perl and /dev/null
otherwise.
Bug: https://github.com/curl/curl/pull/16929#discussion_r2025718160
Reported-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/16930
my $SRCDIR = dirname(__FILE__);
my $fh;
-my $dev_null = $^O eq 'MSWin32' ? 'NUL' : '/dev/null';
+my $dev_null = File::Spec->devnull();
my $KEYSIZE = 'prime256v1';
my $DURATION;
use testutil qw(
shell_quote
);
+use File::Spec qw(
+ devnull
+);
#######################################################################
our $memanalyze="$perl " . shell_quote("$srcdir/memanalyze.pl");
our $valgrind; # path to valgrind, or empty if disabled
our $bundle = 0; # use bundled server, libtest, unit binaries
-our $dev_null = ($^O eq 'MSWin32' ? 'NUL' : '/dev/null');
+our $dev_null = File::Spec->devnull(); # null device path, eg: /dev/null
# paths in $LOGDIR
our $LOCKDIR = "lock"; # root of the server directory with lock files
use Cwd;
use Cwd 'abs_path';
use File::Basename;
+use File::Spec;
my $logdir = "log";
my $pidfile = "$logdir/nghttpx.pid";
my $connect = "127.0.0.1,8990";
my $conf = "nghttpx.conf";
my $cert = "test-localhost";
-my $dev_null = ($^O eq 'MSWin32' ? 'NUL' : '/dev/null');
+my $dev_null = File::Spec->devnull();
#***************************************************************************
# Process command line options
use Cwd;
use Cwd 'abs_path';
use File::Basename;
+use File::Spec;
my $logdir = "log";
my $pidfile = "$logdir/nghttpx.pid";
my $connect = "127.0.0.1,8990";
my $cert = "test-localhost";
my $conf = "nghttpx.conf";
-my $dev_null = ($^O eq 'MSWin32' ? 'NUL' : '/dev/null');
+my $dev_null = File::Spec->devnull();
#***************************************************************************
# Process command line options