Front page | perl.perl5.porters |
Postings from February 2003
[PATCH] $SIG::UNSAFE
Thread Next
From:
Jarkko Hietaniemi
Date:
February 23, 2003 04:45
Subject:
[PATCH] $SIG::UNSAFE
Message ID:
20030223124506.GJ21778@kosh.hut.fi
Here's a patch for enabling in runtime the Old Way Of Signals.
After much waffling I settled on the $SIG::UNSAFE name for the
control variable, which (I think) falls at the right balance of
backward portability, least danger of stomping on a user variable,
and aesthetics. For the documentation see the perlvar patch.
(If the patch looks acceptable, I'll add something in for perlipc
and perlvar/%SIG, too.)
Slaven has kindly tested this a bit (he also squashed a silly
core-dumping bug in an early version of the patch), so it should
do *something* useful.
Unfortunately there is no test script, because I can't think of
anywhere near portable ways to test these kinds of things. Slaven
actually had a promising candidate in eval { @a = 1..$big }, which is
a nice portable way to get an op that takes a while. The bad news is
that one can't of course settle on a single $big, one must calibrate
the $big during runtime-- and that does seem to be really tricky,
since non-linear effects of malloc() kick in when generating such big
lists. I wasted now more than hour trying to get a test script that
would reliably given an "ok" in just two different platforms and I now
gave up.
If people with "safe signal problems" could test this (probably only
works well on blead and maint, not anymore 5.8.0), I would be grateful.
As discussed earlier, the way to enable the Old Way is to set $SIG::UNSAFE
to a true value.
--
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
Thread Next
-
[PATCH] $SIG::UNSAFE
by Jarkko Hietaniemi