diff -pru perl-5.8.7-min-patched/lib/SelfLoader.pm perl-5.8.7-patched/lib/SelfLoader.pm
--- perl-5.8.7-min-patched/lib/SelfLoader.pm	Wed Aug 13 23:37:40 2003
+++ perl-5.8.7-patched/lib/SelfLoader.pm	Mon Nov 27 20:59:08 2006
@@ -58,6 +58,11 @@ sub _load_stubs {
     print STDERR "SelfLoader::load_stubs($callpack)\n" if $DEBUG;
     croak("$callpack doesn't contain an __DATA__ token")
         unless fileno($fh);
+    # Protect: fork() shares the file pointer between the parent and the kid
+    open my $nfh, '<&', $fh or croak "reopen: $!";# dup() the fd
+    close $fh or die "close: $1";		  # autocloses, but be paranoid
+    open $fh, '<&', $nfh or croak "reopen2: $!";  # dup() the fd "back"
+    close $nfh or die "close after reopen: $1";	  # autocloses, but be paranoid
     $Cache{"${currpack}::<DATA"} = 1;   # indicate package is cached
 
     local($/) = "\n";
