Skip to content

Commit

Permalink
move into eval to avoid: Your vendor has not defined POSIX macro SIGC…
Browse files Browse the repository at this point in the history
…HLD, used at t/eintr.t line 29
  • Loading branch information
nmisch committed Mar 9, 2024
1 parent 31c0fea commit c5c2d04
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions t/eintr.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ use IPC::Run qw( start run );

use Time::HiRes qw(gettimeofday tv_interval);
use POSIX;
my $sigchld = POSIX::SigSet->new(SIGCHLD);
for my $have_signal_handler (0, 1) {
for my $timeout (undef, 10) {
unless ($have_signal_handler) {
eval { sigprocmask(SIG_BLOCK, $sigchld); };
eval { sigprocmask(SIG_BLOCK, POSIX::SigSet->new(SIGCHLD)); };
warn $@ if $@;
}
my $timeout_str = defined $timeout ? $timeout : 'n/a';
Expand All @@ -39,7 +38,7 @@ for my $have_signal_handler (0, 1) {
diag "duration have_signal_handler=$have_signal_handler timeout=$timeout_str: "
. tv_interval($before, [gettimeofday]);
unless ($have_signal_handler) {
eval { sigprocmask(SIG_UNBLOCK, $sigchld); };
eval { sigprocmask(SIG_UNBLOCK, POSIX::SigSet->new(SIGCHLD)); };
warn $@ if $@;
}
}
Expand Down

0 comments on commit c5c2d04

Please sign in to comment.