This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
&CORE::fork()
authorFather Chrysostomos <sprout@cpan.org>
Sat, 20 Aug 2011 06:29:53 +0000 (23:29 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 20 Aug 2011 06:29:53 +0000 (23:29 -0700)
In commit 7fa5bd9b5, I not only forgot about getpwent (see commit
cc131e4, in which I mistakenly called it pwent), but fork as well.
Again, all this commit has to do is add it to the list of ‘ampable’
functions in gv.c.  The rest already works.

gv.c
t/op/coresubs.t

diff --git a/gv.c b/gv.c
index aaa6441..edc6202 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1356,6 +1356,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
            case KEY_continue: case KEY_endgrent: case KEY_endhostent:
            case KEY_endnetent: case KEY_endprotoent: case KEY_endpwent:
            case KEY_endservent: case KEY_getgrent: case KEY_gethostent:
+           case KEY_fork:
            case KEY_getlogin: case KEY_getnetent: case KEY_getppid:
            case KEY_getprotoent: case KEY_getservent: case KEY_getpwent:
            case KEY_setgrent:
index 0aa9c38..d1a2edc 100644 (file)
@@ -69,6 +69,8 @@ test_proto $_ for qw(
  endgrent endhostent endnetent endprotoent endpwent endservent
 );
 
+test_proto 'fork';
+
 test_proto "get$_" for qw '
   grent hostent login
   netent ppid protoent