This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Introduction of d_pseudofork
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Tue, 5 Dec 2006 14:55:14 +0000 (14:55 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Tue, 5 Dec 2006 14:55:14 +0000 (14:55 +0000)
p4raw-id: //depot/perl@29467

Configure
Porting/Glossary
Porting/config.sh
config_h.SH
handy.h
uconfig.sh

index 1fcd111..cc86d68 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -26,7 +26,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Mon Dec  4 19:08:33 CET 2006 [metaconfig 3.0 PL70]
+# Generated on Tue Dec  5 15:35:51 CET 2006 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -795,6 +795,7 @@ d_unsetenv=''
 d_usleep=''
 d_usleepproto=''
 d_ustat=''
+d_pseudofork=''
 d_vfork=''
 usevfork=''
 d_voidsig=''
@@ -15571,6 +15572,54 @@ $rm -f reflect
 set d_procselfexe
 eval $setvar
 
+: backward compatibility for d_hvfork
+if test X$d_hvfork != X; then
+       d_vfork="$d_hvfork"
+       d_hvfork=''
+fi
+: see if there is a vfork
+val=''
+set vfork val
+eval $inlibc
+
+d_pseudofork=$undef
+
+: Ok, but do we want to use it. vfork is reportedly unreliable in
+: perl on Solaris 2.x, and probably elsewhere.
+case "$val" in
+$define)
+       echo " "
+       case "$usevfork" in
+       false) dflt='n';;
+       *) dflt='y';;
+       esac
+       cat <<'EOM'
+
+Perl can only use a vfork() that doesn't suffer from strict
+restrictions on calling functions or modifying global data in
+the child.  For example, glibc-2.1 contains such a vfork()
+that is unsuitable.  If your system provides a proper fork()
+call, chances are that you do NOT want perl to use vfork().
+
+EOM
+       rp="Do you still want to use vfork()?"
+       . ./myread
+       case "$ans" in
+       y|Y) ;;
+       *)
+               echo "Ok, we won't use vfork()."
+               val="$undef"
+               ;;
+       esac
+       ;;
+esac
+set d_vfork
+eval $setvar
+case "$d_vfork" in
+$define) usevfork='true';;
+*) usevfork='false';;
+esac
+
 : see whether the pthread_atfork exists
 $cat >try.c <<EOP
 #include <pthread.h>
@@ -18079,52 +18128,6 @@ eval $hasproto
 set ustat d_ustat
 eval $inlibc
 
-: backward compatibility for d_hvfork
-if test X$d_hvfork != X; then
-       d_vfork="$d_hvfork"
-       d_hvfork=''
-fi
-: see if there is a vfork
-val=''
-set vfork val
-eval $inlibc
-
-: Ok, but do we want to use it. vfork is reportedly unreliable in 
-: perl on Solaris 2.x, and probably elsewhere.
-case "$val" in
-$define)
-       echo " "
-       case "$usevfork" in
-       false) dflt='n';;
-       *) dflt='y';;
-       esac
-       cat <<'EOM'
-Perl can only use a vfork() that doesn't suffer from strict
-restrictions on calling functions or modifying global data in
-the child.  For example, glibc-2.1 contains such a vfork()
-that is unsuitable.  If your system provides a proper fork()
-call, chances are that you do NOT want perl to use vfork().
-
-EOM
-       rp="Do you still want to use vfork()?"
-       . ./myread
-       case "$ans" in
-       y|Y) ;;
-       *)
-               echo "Ok, we won't use vfork()."
-               val="$undef"
-               ;;
-       esac
-       ;;
-esac
-set d_vfork
-eval $setvar
-case "$d_vfork" in
-$define) usevfork='true';;
-*) usevfork='false';;
-esac
-
 : see if closedir exists
 set closedir d_closedir
 eval $inlibc
@@ -21756,6 +21759,7 @@ d_poll='$d_poll'
 d_portable='$d_portable'
 d_printf_format_null='$d_printf_format_null'
 d_procselfexe='$d_procselfexe'
+d_pseudofork='$d_pseudofork'
 d_pthread_atfork='$d_pthread_atfork'
 d_pthread_attr_setscope='$d_pthread_attr_setscope'
 d_pthread_yield='$d_pthread_yield'
index 8f92242..4c6fc60 100644 (file)
@@ -1572,6 +1572,10 @@ d_procselfexe (d_procselfexe.U):
        Defined if $procselfexe is symlink to the absolute
        pathname of the executing program.
 
+d_pseudofork (d_vfork.U):
+       This variable conditionally defines the HAS_PSEUDOFORK symbol,
+       which indicates that an emulation of the fork routine is available.
+
 d_pthread_atfork (d_pthread_atfork.U):
        This variable conditionally defines the HAS_PTHREAD_ATFORK symbol,
        which indicates to the C program that the pthread_atfork()
index acdce83..fe4d39e 100644 (file)
@@ -345,6 +345,7 @@ d_poll='define'
 d_portable='define'
 d_printf_format_null='define'
 d_procselfexe='define'
+d_pseudofork='undef'
 d_pthread_atfork='undef'
 d_pthread_attr_setscope='define'
 d_pthread_yield='define'
index 9593b21..84eb8ae 100644 (file)
@@ -3325,6 +3325,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
  */
 #$d_vfork HAS_VFORK    /**/
 
+/* HAS_PSEUDOFORK:
+ *     This symbol, if defined, indicates that an emulation of the
+ *     fork routine is available.
+ */
+#$d_pseudofork HAS_PSEUDOFORK  /**/
+
 /* Signal_t:
  *     This symbol's value is either "void" or "int", corresponding to the
  *     appropriate return type of a signal handler.  Thus, you can declare
diff --git a/handy.h b/handy.h
index 81bdd03..701db82 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -175,7 +175,7 @@ typedef U64TYPE U64;
 #endif
 
 /* HMB H.Merijn Brand - a placeholder for preparing Configure patches */
-#if defined(HAS_MALLOC_SIZE) && defined(LOCALTIME_R_NEEDS_TZSET) && defined(HAS_DIR_DD_FD)
+#if defined(HAS_MALLOC_SIZE) && defined(LOCALTIME_R_NEEDS_TZSET) && defined(HAS_DIR_DD_FD) && defined(HAS_PSEUDOFORK)
 /* Not (yet) used at top level, but mention them for metaconfig */
 #endif
 
index eabd715..0c48785 100755 (executable)
@@ -284,6 +284,7 @@ d_poll='undef'
 d_portable='undef'
 d_printf_format_null='undef'
 d_procselfexe='undef'
+d_pseudofork='undef'
 d_pthread_atfork='undef'
 d_pthread_attr_setscope='undef'
 d_pthread_yield='undef'