At compile time, test the condition via Configure, and patch
perl's shutdown() to add 1 to the ``how'' parameter (don't just
swap 0 and 1, that's not the bug).
At runtime, only if the ``add 1'' patch is compiled in and taint
mode is off, check the environment variable PERL_SHUTDOWN_FIX; if
it's a non-empty string (such as ``NO''), turn off the patch.
This lets people build correctly-functioning perls, on buggy
(currently more common, IMO) Linux boxes, which can be patched to
work on very-new, non-buggy Linuces. Thus, the onus is on people
who use development or really-recent kernels, and who also want to
install pre-compiled perls based on older kernels; my sense is that
this savvy group will be willing to exert the extra effort.
Add some documentation (to README?), warning people of the
temperature of the water in their vicinity.
> Do the 'uname' system call and look at the version number at runtime. Have 2
> configuration variables which contain the shutdown states. If you detect
> strncmp(utsname.release,"2.0",3)==0 then set it up for the munge, else
> make it right. This can all just be an #ifdef to please the clean code guys.
The bug is fixed in 2.1.x (for some unknown-to-me value of x)
and, based on a Usenet search, has some likelihood of making it
into 2.0.34 -- scanning for "2.0" is probably not sufficient.
Peace,
* Kurt Starsinic (kstar@isinet.com) ------------------ Technical Specialist *
| "Beware of bugs in the above code; I have only |
| proved it correct, not tried it." - Donald Knuth |
Institute for Scientific Information http://www.isinet.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu