]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/main.c
make logs symmetric
[openldap] / servers / slapd / main.c
index fa008ee2cff64d22bd77aa1d9b08ab38746e3e14..64d1876dc747acac227ebdfe235662b0c51ab2d5 100644 (file)
@@ -699,6 +699,7 @@ unhandled_option:;
        Debug( LDAP_DEBUG_ANY, "%s", Versionstr, 0, 0 );
 
        global_host = ldap_pvt_get_fqdn( NULL );
+       ber_str2bv( global_host, 0, 0, &global_host_bv );
 
        if( check == CHECK_NONE && slapd_daemon_init( urls ) != 0 ) {
                rc = 1;
@@ -1056,13 +1057,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 +1072,3 @@ wait4child( int sig )
 }
 
 #endif /* LDAP_SIGCHLD */
-