]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/main.c
ITS#6045: Use copy of db when testing filter in matchops.
[openldap] / servers / slapd / main.c
index 160b8200fb2568ac6f6ebe07932f8e66d0183d4d..b22e8b70f139c65beb1c76d52e92689e134126ce 100644 (file)
@@ -792,7 +792,7 @@ unhandled_option:;
                }
        }
 
-       if ( glue_sub_attach( ) != 0 ) {
+       if ( glue_sub_attach( ) != 0 ) {
                Debug( LDAP_DEBUG_ANY,
                    "subordinate config error\n",
                    0, 0, 0 );
@@ -1056,13 +1056,12 @@ wait4child( int sig )
     int save_errno = errno;
 
 #ifdef WNOHANG
-    errno = 0;
+    do
+        errno = 0;
 #ifdef HAVE_WAITPID
-    while ( waitpid( (pid_t)-1, NULL, WNOHANG ) > 0 || errno == EINTR )
-       ;       /* NULL */
+    while ( waitpid( (pid_t)-1, NULL, WNOHANG ) > 0 || errno == EINTR );
 #else
-    while ( wait3( NULL, WNOHANG, NULL ) > 0 || errno == EINTR )
-       ;       /* NULL */
+    while ( wait3( NULL, WNOHANG, NULL ) > 0 || errno == EINTR );
 #endif
 #else
     (void) wait( NULL );
@@ -1072,4 +1071,3 @@ wait4child( int sig )
 }
 
 #endif /* LDAP_SIGCHLD */
-