From 2563cec55ae473562ff3ccda41cd10289db419be Mon Sep 17 00:00:00 2001 From: Ilya Zakharevich Date: Sun, 17 Dec 2006 16:55:19 -0800 Subject: [PATCH] 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 --- mg.c | 8 +++++++- pod/perldiag.pod | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/mg.c b/mg.c index b0af1c8..d658bbc 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 diff --git a/pod/perldiag.pod b/pod/perldiag.pod index c8c90ef..af7c9c4 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -2285,6 +2285,14 @@ rules and perl was unable to guess how to make more progress. (F) You tried to unpack something that didn't comply with UTF-8 encoding rules and perl was unable to guess how to make more progress. +=item Maximal count of pending signals (%s) exceeded + +(F) Perl aborted due to a too important number of signals pending. This +usually indicates that your operating system tried to deliver signals +too fast (with a very high priority), starving the perl process from +resources it would need to reach a point where it can process signals +safely. (See L.) + =item %s matches null string many times in regex; marked by <-- HERE in m/%s/ (W regexp) The pattern you've specified would be an infinite loop if the -- 2.7.4