Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
75467fb3
Commit
75467fb3
authored
24 years ago
by
Randy Kunkee
Browse files
Options
Downloads
Patches
Plain Diff
Rework order of things to allow restart in oneshot mode.
parent
0d1e7624
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slurpd/main.c
+19
-10
19 additions, 10 deletions
servers/slurpd/main.c
with
19 additions
and
10 deletions
servers/slurpd/main.c
+
19
−
10
View file @
75467fb3
...
...
@@ -102,13 +102,6 @@ main(
if
(
!
(
sglob
->
no_detach
||
sglob
->
one_shot_mode
)
)
lutil_detach
(
0
,
0
);
/*
* Start threads - one thread for each replica
*/
for
(
i
=
0
;
sglob
->
replicas
[
i
]
!=
NULL
;
i
++
)
{
start_replica_thread
(
sglob
->
replicas
[
i
]);
}
/*
* Start the main file manager thread (in fm.c).
*/
...
...
@@ -121,10 +114,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.
...
...
@@ -133,8 +142,8 @@ main(
ldap_pvt_thread_join
(
sglob
->
replicas
[
i
]
->
ri_tid
,
(
void
*
)
NULL
);
}
/* destroy the thread package */
ldap_pvt_thread_destroy
();
/* destroy the thread package */
ldap_pvt_thread_destroy
();
Debug
(
LDAP_DEBUG_ANY
,
"slurpd: terminated.
\n
"
,
0
,
0
,
0
);
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment