Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn McKinney
OpenLDAP
Commits
5b508b89
Commit
5b508b89
authored
Apr 26, 2000
by
Randy Kunkee
Browse files
Make slurpd work when restarting in one-shot mode.
parent
cc0cb627
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slurpd/main.c
View file @
5b508b89
...
...
@@ -101,15 +101,8 @@ main(
#endif
/* LDAP_DEBUG */
lutil_detach
(
0
,
0
);
/* initialize thread package */
ldap_pvt_thread_initialize
();
/*
* Start threads - one thread for each replica
*/
for
(
i
=
0
;
sglob
->
replicas
[
i
]
!=
NULL
;
i
++
)
{
start_replica_thread
(
sglob
->
replicas
[
i
]);
}
/* initialize thread package */
ldap_pvt_thread_initialize
();
/*
* Start the main file manager thread (in fm.c).
...
...
@@ -123,10 +116,26 @@ main(
}
/*
* wait for fm to finish if in oneshot mode
*/
if
(
sglob
->
one_shot_mode
)
{
ldap_pvt_thread_join
(
sglob
->
fm_tid
,
(
void
*
)
NULL
);
}
/*
* Start threads - one thread for each replica
*/
for
(
i
=
0
;
sglob
->
replicas
[
i
]
!=
NULL
;
i
++
)
{
start_replica_thread
(
sglob
->
replicas
[
i
]);
}
/*
* Wait for the fm thread to finish.
*/
ldap_pvt_thread_join
(
sglob
->
fm_tid
,
(
void
*
)
NULL
);
if
(
!
sglob
->
one_shot_mode
)
{
ldap_pvt_thread_join
(
sglob
->
fm_tid
,
(
void
*
)
NULL
);
}
/*
* Wait for the replica threads to finish.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment