Skip to content

Commit 1372fc7

Browse files
committed
t/op/magic.t redirect stderr to /dev/null
This file calls ps(1), assuming that ps accepts the 'h' and 'hc' options. This is non-portable. The comments in the code indicate that these tests are optional; just skip them if the ps doesn't work. The problem is that noise gets generated on such platforms. Simply redirect stderr to /dev/null, suppressing any warnings.
1 parent 79db27d commit 1372fc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/op/magic.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ EOP
412412
# work (like if the system doesn't have a ps(1) for whatever
413413
# reason) just bail out gracefully.
414414
my $maybe_ps = sub {
415-
my ($cmd) = @_;
415+
my ($cmd) = @_ ;
416+
$cmd .= " 2>$::devnull";
416417
local ($?, $!);
417418

418419
no warnings;

0 commit comments

Comments
 (0)