Date: Mon, 24 Jan 2000 22:48:46 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> To: larse@ISI.EDU (Lars Eggert) Cc: perl5-porters@perl.org, current@freebsd.org Subject: Re: [ID 20000124.004] "perl in malloc(): warning: recursive call" on Message-ID: <200001250348.WAA21600@monk.mps.ohio-state.edu> In-Reply-To: <200001250006.QAA13204@sub.isi.edu> from "Lars Eggert" at Jan 24, 2000 04:06:09 PM
next in thread | previous in thread | raw e-mail | index | archive | help
Lars Eggert writes: > Running the following test script causes perl to crash. You may need > to run the script several times before seeing the problem. (The script > spawns a child process that does nothing but write to an array. The > parent signals the child periodically.) Signals and Perl do not mix. Please do not use signals if a segfault is not a desirable form of output. > $SIG{ALRM} = sub { $state++ }; One should not do anything as bad as that in a sighandler. What is the failure rate you see? You may get slightly better rate (3% in my tests) with something like $SIG{ALRM} = sub { ++$state ; return }; and preallocating $state = 0; Ilya To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001250348.WAA21600>