zero signals (now -1 is the "not found"). Note that
in couple of mg.c spots only whichsig() > 0 branches
are taken because signal handlers et al don't make
much sense for the zero signal.
p4raw-id: //depot/perl@18975
if (mark == sp)
break;
s = SvPVx(*++mark, n_a);
- if (isUPPER(*s)) {
+ if (isALPHA(*s)) {
if (*s == 'S' && s[1] == 'I' && s[2] == 'G')
s += 3;
- if (!(val = whichsig(s)))
+ if ((val = whichsig(s)) < 0)
Perl_croak(aTHX_ "Unrecognized signal name \"%s\"",s);
}
else
STRLEN n_a;
/* Are we fetching a signal entry? */
i = whichsig(MgPV(mg,n_a));
- if (i) {
+ if (i > 0) {
if(PL_psig_ptr[i])
sv_setsv(sv,PL_psig_ptr[i]);
else {
I32 i;
/* Are we clearing a signal entry? */
i = whichsig(s);
- if (i) {
+ if (i > 0) {
#ifdef HAS_SIGPROCMASK
sigset_t set, save;
SV* save_sv;
}
else {
i = whichsig(s); /* ...no, a brick */
- if (!i) {
+ if (i < 0) {
if (ckWARN(WARN_SIGNAL))
Perl_warner(aTHX_ packWARN(WARN_SIGNAL), "No such signal: SIG%s", s);
return 0;
{
register char **sigv;
- for (sigv = PL_sig_name+1; *sigv; sigv++)
+ for (sigv = PL_sig_name; *sigv; sigv++)
if (strEQ(sig,*sigv))
return PL_sig_num[sigv - PL_sig_name];
#ifdef SIGCLD