mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-12 15:10:31 +08:00
remove wait3 rusage check. Consistently use wait4 instead.
This commit is contained in:
parent
868fbc8b10
commit
c06bf35dd0
5
CHANGES
5
CHANGES
@ -9,7 +9,6 @@ Changes included in OpenLDAP 1.2
|
||||
Added slapd logging option
|
||||
Added slapd nextid chunking
|
||||
Added LDBM DB2 debugging support
|
||||
Added build support for FreeBSD 4.x
|
||||
Fixed client SIGPIPE handling
|
||||
Fixed configure wait3 handling
|
||||
Fixed lber leaking ber_scanf
|
||||
@ -19,6 +18,10 @@ Changes included in OpenLDAP 1.2
|
||||
Updated slapd alias deref functionality to be optional
|
||||
Updated slapd DN handling
|
||||
Updated client/tools Kerberos option handling
|
||||
Build environment
|
||||
Added -kthread detection for FreeBSD kernel threads.
|
||||
Added libtool support for FreeBSD 4.x
|
||||
Removed wait3 test.
|
||||
|
||||
Changes included in OpenLDAP 1.1.3
|
||||
CVS Tag: OPENLDAP_REL_ENG_1_1_3
|
||||
|
@ -321,10 +321,10 @@ wait4child( int sig )
|
||||
if ( debug ) printf( "parent: catching child status\n" );
|
||||
|
||||
#ifdef HAVE_WAITPID
|
||||
while (waitpid ((pid_t) -1, 0, WAIT_FLAGS) > 0)
|
||||
while (waitpid ((pid_t) -1, (int *) NULL, WAIT_FLAGS) > 0)
|
||||
; /* NULL */
|
||||
#else
|
||||
while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 )
|
||||
while ( wait4((pid_t) -1, &status, WAIT_FLAGS, 0 ) > 0 )
|
||||
; /* NULL */
|
||||
#endif
|
||||
|
||||
|
@ -350,10 +350,10 @@ wait4child( int sig )
|
||||
if ( debug ) printf( "parent: catching child status\n" );
|
||||
|
||||
#ifdef HAVE_WAITPID
|
||||
while (waitpid ((pid_t) -1, NULL, WAIT_FLAGS) > 0)
|
||||
while (waitpid ((pid_t) -1, (int *) NULL, WAIT_FLAGS) > 0)
|
||||
; /* NULL */
|
||||
#else
|
||||
while (wait3( &status, WAIT_FLAGS, 0 ) > 0 )
|
||||
while (wait4( (pid_t) -1, &status, WAIT_FLAGS, 0 ) > 0 )
|
||||
; /* NULL */
|
||||
#endif
|
||||
|
||||
|
89
configure
vendored
89
configure
vendored
@ -6130,7 +6130,7 @@ if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
|
||||
ol_enable_ldbm=no
|
||||
fi
|
||||
|
||||
if test $ol_enable_wrappers = yes ; then
|
||||
if test $ol_enable_wrappers != no ; then
|
||||
echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
|
||||
echo "configure:6136: checking for main in -lwrap" >&5
|
||||
ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
|
||||
@ -8045,69 +8045,6 @@ done
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
|
||||
echo "configure:8050: checking for wait3 that fills in rusage" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
ac_cv_func_wait3_rusage=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8058 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <stdio.h>
|
||||
/* HP-UX has wait3 but does not fill in rusage at all. */
|
||||
main() {
|
||||
struct rusage r;
|
||||
int i;
|
||||
/* Use a field that we can force nonzero --
|
||||
voluntary context switches.
|
||||
For systems like NeXT and OSF/1 that don't set it,
|
||||
also use the system CPU time. And page faults (I/O) for Linux. */
|
||||
r.ru_nvcsw = 0;
|
||||
r.ru_stime.tv_sec = 0;
|
||||
r.ru_stime.tv_usec = 0;
|
||||
r.ru_majflt = r.ru_minflt = 0;
|
||||
switch (fork()) {
|
||||
case 0: /* Child. */
|
||||
sleep(1); /* Give up the CPU. */
|
||||
_exit(0);
|
||||
case -1: _exit(0); /* What can we do? */
|
||||
default: /* Parent. */
|
||||
wait3(&i, 0, &r);
|
||||
sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */
|
||||
exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
|
||||
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
|
||||
}
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_func_wait3_rusage=yes
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -fr conftest*
|
||||
ac_cv_func_wait3_rusage=no
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
|
||||
if test $ac_cv_func_wait3_rusage = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_WAIT3 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
for ac_func in \
|
||||
bcopy \
|
||||
flock \
|
||||
@ -8139,12 +8076,12 @@ for ac_func in \
|
||||
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:8143: checking for $ac_func" >&5
|
||||
echo "configure:8080: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8148 "configure"
|
||||
#line 8085 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -8167,7 +8104,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:8171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:8108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -8195,12 +8132,12 @@ done
|
||||
for ac_func in getopt strdup tempnam
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:8199: checking for $ac_func" >&5
|
||||
echo "configure:8136: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8204 "configure"
|
||||
#line 8141 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -8223,7 +8160,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:8227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:8164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -8253,13 +8190,13 @@ done
|
||||
# Check Configuration
|
||||
|
||||
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
|
||||
echo "configure:8257: checking declaration of sys_errlist" >&5
|
||||
echo "configure:8194: checking declaration of sys_errlist" >&5
|
||||
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8263 "configure"
|
||||
#line 8200 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -8269,7 +8206,7 @@ int main() {
|
||||
char *c = (char *) *sys_errlist
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:8273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:8210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ol_cv_dcl_sys_errlist=yes
|
||||
else
|
||||
@ -8290,20 +8227,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then
|
||||
EOF
|
||||
|
||||
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
|
||||
echo "configure:8294: checking existence of sys_errlist" >&5
|
||||
echo "configure:8231: checking existence of sys_errlist" >&5
|
||||
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8300 "configure"
|
||||
#line 8237 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <errno.h>
|
||||
int main() {
|
||||
char *c = (char *) *sys_errlist
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ol_cv_have_sys_errlist=yes
|
||||
else
|
||||
|
@ -40,7 +40,6 @@ AC_ARG_WITH(subdir, [ --with-subdir=DIR change default subdirectory used for in
|
||||
AC_SUBST(ldap_subdir)dnl
|
||||
|
||||
OL_ARG_ENABLE(debug,[ --enable-debug enable debugging], yes)dnl
|
||||
dnl OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl
|
||||
OL_ARG_ENABLE(proctitle,[ --enable-proctitle enable proctitle support], yes)dnl
|
||||
OL_ARG_ENABLE(libui,[ --enable-libui enable library user interface], yes)dnl
|
||||
OL_ARG_ENABLE(cache,[ --enable-cache enable caching], yes)dnl
|
||||
@ -1021,7 +1020,7 @@ if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
|
||||
ol_enable_ldbm=no
|
||||
fi
|
||||
|
||||
if test $ol_enable_wrappers = yes ; then
|
||||
if test $ol_enable_wrappers != no ; then
|
||||
AC_CHECK_LIB(wrap, main,
|
||||
[have_wrappers=yes], [have_wrappers=no])
|
||||
|
||||
@ -1186,8 +1185,6 @@ if test $ac_cv_func_vprintf = yes ; then
|
||||
AC_CHECK_FUNCS(vsnprintf vsprintf)
|
||||
fi
|
||||
|
||||
AC_FUNC_WAIT3
|
||||
|
||||
AC_CHECK_FUNCS( \
|
||||
bcopy \
|
||||
flock \
|
||||
@ -1231,9 +1228,6 @@ dnl Sort out defines
|
||||
if test "$ol_enable_debug" != no ; then
|
||||
AC_DEFINE(LDAP_DEBUG,1)
|
||||
fi
|
||||
dnl if test "$ol_enable_syslog" != no ; then
|
||||
dnl AC_DEFINE(LDAP_SYSLOG,1)
|
||||
dnl fi
|
||||
if test "$ol_enable_libui" = yes ; then
|
||||
AC_DEFINE(LDAP_LIBUI,1)
|
||||
fi
|
||||
|
@ -47,9 +47,6 @@
|
||||
/* Define if you have the vprintf function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define if you have the wait3 system call. */
|
||||
#undef HAVE_WAIT3
|
||||
|
||||
/* Define if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
|
@ -652,10 +652,10 @@ wait4child( int sig )
|
||||
Debug( LDAP_DEBUG_TRACE, "parent: catching child status\n", 0, 0, 0 );
|
||||
|
||||
#ifdef HAVE_WAITPID
|
||||
while( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) > 0 )
|
||||
while( waitpid( (pid_t) -1, (int *) NULL, WAIT_FLAGS ) > 0 )
|
||||
; /* NULL */
|
||||
#else
|
||||
while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 )
|
||||
while ( wait4( (pid_t) -1, &status, WAIT_FLAGS, 0 ) > 0 )
|
||||
; /* NULL */
|
||||
#endif
|
||||
|
||||
|
@ -537,7 +537,7 @@ edit_entry( char c, Datum *data )
|
||||
#ifdef HAVE_WAITPID
|
||||
if ( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) < 0 ) {
|
||||
#else
|
||||
if ( wait3( &status, WAIT_FLAGS, 0 ) < 0 ) {
|
||||
if ( wait4( (pid_t) -1, &status, WAIT_FLAGS, 0 ) < 0 ) {
|
||||
#endif
|
||||
perror( "wait" );
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user