From: Gary Williams Date: Wed, 14 Apr 1999 16:56:23 +0000 (+0000) Subject: I moved slap_shutdown after the waitforkids. I also wait for each process to complet... X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~170 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=84f84c28b8ff3d761b2123a3dd226f778c380e47;p=openldap I moved slap_shutdown after the waitforkids. I also wait for each process to complete before returning from fork_child since I had two lockups on my NT box. --- diff --git a/servers/slapd/tools/ldif2ldbm.c b/servers/slapd/tools/ldif2ldbm.c index ff23513482..5b7f80b7e2 100644 --- a/servers/slapd/tools/ldif2ldbm.c +++ b/servers/slapd/tools/ldif2ldbm.c @@ -274,10 +274,10 @@ main( int argc, char **argv ) } } - slap_shutdown(dbnum); - wait4kids( -1 ); + slap_shutdown(dbnum); + slap_destroy(); return( 0 ); @@ -315,8 +315,12 @@ fork_child( char *prog, char *args[] ) perror( "CreateProcess" ); exit (-1); } +#ifndef IMDARING + WaitForSingleObject( proc_info.hProcess, INFINITE ); +#else processes[nprocesses] = proc_info.hProcess; nprocesses++; +#endif } static void