summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>2006-12-17 16:55:19 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-18 10:49:15 +0000
commit2563cec55ae473562ff3ccda41cd10289db419be (patch)
treeecc52eff5126281981cf3d3b8560f69804eb90b5 /mg.c
parentc944940bcb88dd1d6b36277c4a80ccce87a5f9b8 (diff)
downloadperl-2563cec55ae473562ff3ccda41cd10289db419be.tar.gz
OS/2: survive SIGCHLD
Message-ID: <20061218085519.GA14893@powdermilk.math.berkeley.edu> plus a perldiag entry for the new error, "Maximal count of pending signals (%s) exceeded" p4raw-id: //depot/perl@29577
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index b0af1c841e..d658bbca33 100644
--- a/mg.c
+++ b/mg.c
@@ -1290,6 +1290,10 @@ Perl_magic_clearsig(pTHX_ SV *sv, MAGIC *mg)
return 0;
}
+#ifndef SIG_PENDING_DIE_COUNT
+# define SIG_PENDING_DIE_COUNT 120
+#endif
+
static void
S_raise_signal(pTHX_ int sig)
{
@@ -1297,7 +1301,9 @@ S_raise_signal(pTHX_ int sig)
/* Set a flag to say this signal is pending */
PL_psig_pend[sig]++;
/* And one to say _a_ signal is pending */
- PL_sig_pending = 1;
+ if (++PL_sig_pending >= SIG_PENDING_DIE_COUNT)
+ Perl_croak(aTHX_ "Maximal count of pending signals (%lu) exceeded",
+ (unsigned long)SIG_PENDING_DIE_COUNT);
}
Signal_t