Commit
af2fe5eb7afec48a added a test for fork returning undef on failure,
which used ulimit -u to lower the number of user processes to provoke fork
failure. Whilst the test was careful to ensure that it only attempted this
if the shell is bash or zsh, it turns out that one some platforms (at least
HP-UX and AIX), bash offers ulimit -u, but will always error if its use is
attempted. So probe that ulimit -u can be used, and skip the test if it
can't.
SKIP: {
skip "This test can only be run under bash or zsh"
unless $shell =~ m{/(?:ba|z)sh$};
+ my $probe = qx{
+ $shell -c 'ulimit -u 1 2>&1 && echo good'
+ };
+ chomp $probe;
+ skip "Can't set ulimit -u on this system: $probe"
+ unless $probe eq 'good';
my $out = qx{
$shell -c 'ulimit -u 1; exec $^X -e "