use Errno, not POSIX, to get EINTR; maybe this is more portable

This commit is contained in:
tg 2012-03-31 18:47:20 +00:00
parent 16732f7e0f
commit 3c4d2602ac

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.pl,v 1.28 2012/03/26 21:06:34 tg Exp $ # $MirOS: src/bin/mksh/check.pl,v 1.29 2012/03/31 18:47:20 tg Exp $
# $OpenBSD: th,v 1.13 2006/05/18 21:27:23 miod Exp $ # $OpenBSD: th,v 1.13 2006/05/18 21:27:23 miod Exp $
#- #-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012
@ -151,7 +151,8 @@
# p tag takes parameters (used with m). # p tag takes parameters (used with m).
# s tag can be used several times. # s tag can be used several times.
use POSIX qw(EINTR); #use POSIX qw(EINTR);
use Errno;
use Getopt::Std; use Getopt::Std;
use Config; use Config;
@ -557,7 +558,9 @@ run_test
$xpid = waitpid($pid, 0); $xpid = waitpid($pid, 0);
$child_kill_ok = 0; $child_kill_ok = 0;
if ($xpid < 0) { if ($xpid < 0) {
next if $! == EINTR; if ($!{EINTR}) {
next if $! == EINTR;
}
print STDERR "$prog: error waiting for child - $!\n"; print STDERR "$prog: error waiting for child - $!\n";
return undef; return undef;
} }