From: H.Merijn Brand Date: Tue, 5 Dec 2006 14:55:14 +0000 (+0000) Subject: Introduction of d_pseudofork X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=233e16ceab6589cdfcfeefabef027f39026bb05f;p=p5sagit%2Fp5-mst-13.2.git Introduction of d_pseudofork p4raw-id: //depot/perl@29467 --- diff --git a/Configure b/Configure index 1fcd111..cc86d68 100755 --- 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$$ <try.c < @@ -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' diff --git a/Porting/Glossary b/Porting/Glossary index 8f92242..4c6fc60 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -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() diff --git a/Porting/config.sh b/Porting/config.sh index acdce83..fe4d39e 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -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' diff --git a/config_h.SH b/config_h.SH index 9593b21..84eb8ae 100644 --- a/config_h.SH +++ b/config_h.SH @@ -3325,6 +3325,12 @@ sed <$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 --- 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 diff --git a/uconfig.sh b/uconfig.sh index eabd715..0c48785 100755 --- a/uconfig.sh +++ b/uconfig.sh @@ -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'