Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Eric Vidal
66
Commits
bef06459
Commit
bef06459
authored
2 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
fix signal list, deal with module type
parent
ff7e691f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib66/exec/ssexec_service_signal.c
+35
-5
35 additions, 5 deletions
src/lib66/exec/ssexec_service_signal.c
with
35 additions
and
5 deletions
src/lib66/exec/ssexec_service_signal.c
+
35
−
5
View file @
bef06459
...
...
@@ -312,7 +312,7 @@ static void pidservice_init_array(unsigned int *list, unsigned int listlen, pids
if
(
pids
.
vertex
<
0
)
log_dieu
(
LOG_EXIT_SYS
,
"get vertex id -- please make a bug report"
)
;
if
(
ares
[
pids
.
aresid
].
type
=
=
TYPE_
ONESHOT
)
{
if
(
ares
[
pids
.
aresid
].
type
!
=
TYPE_
CLASSIC
)
{
ss_state_t
ste
=
STATE_ZERO
;
...
...
@@ -451,7 +451,7 @@ static int doit(pidservice_t *sv, unsigned int what, tain *deadline)
/**
* Those type are not real services. Passing here with
* this kind of service means that the dependencies
* of the service was passed
anyway
. So, we can consider it as
* of the service was passed. So, we can consider it as
* already up/down.
* */
return
0
;
...
...
@@ -858,9 +858,12 @@ int ssexec_service_signal(int argc, char const *const *argv, ssexec_t *info)
case
'r'
:
case
'o'
:
case
'd'
:
case
'D'
:
case
'u'
:
case
'U'
:
case
'x'
:
case
'O'
:
case
'Q'
:
if
(
datalen
>=
DATASIZE
)
log_die
(
LOG_EXIT_USER
,
"too many arguments"
)
;
...
...
@@ -905,10 +908,9 @@ int ssexec_service_signal(int argc, char const *const *argv, ssexec_t *info)
reloadmsg
=
2
;
if
(
what
)
{
requiredby
=
1
;
FLAGS_SET
(
gflag
,
STATE_FLAGS_WANT
UP
)
;
FLAGS_CLEAR
(
gflag
,
STATE_FLAGS_WANT
DOWN
)
;
FLAGS_SET
(
gflag
,
STATE_FLAGS_WANT
DOWN
)
;
FLAGS_CLEAR
(
gflag
,
STATE_FLAGS_WANT
UP
)
;
}
if
((
svc_scandir_ok
(
info
->
scandir
.
s
))
!=
1
)
...
...
@@ -949,6 +951,34 @@ int ssexec_service_signal(int argc, char const *const *argv, ssexec_t *info)
visit
[
l
[
pos
]]
=
1
;
}
}
if
(
ares
[
aresid
].
type
==
TYPE_MODULE
)
{
if
(
ares
[
aresid
].
regex
.
ncontents
)
{
stralloc
sa
=
STRALLOC_ZERO
;
if
(
!
sastr_clean_string
(
&
sa
,
ares
[
aresid
].
sa
.
s
+
ares
[
aresid
].
regex
.
contents
))
log_dieu
(
LOG_EXIT_SYS
,
"clean string"
)
;
{
size_t
idx
=
0
;
FOREACH_SASTR
(
&
sa
,
idx
)
{
/** find dependencies of the service from the graph, do it recursively */
c
=
graph_matrix_get_edge_g_list
(
l
,
&
graph
,
sa
.
s
+
idx
,
0
,
1
)
;
/** append to the list to deal with */
for
(
pos
=
0
;
pos
<
c
;
pos
++
)
{
if
(
!
visit
[
l
[
pos
]])
{
list
[
napid
++
]
=
l
[
pos
]
;
visit
[
l
[
pos
]]
=
1
;
}
}
}
}
stralloc_free
(
&
sa
)
;
}
}
}
pidservice_t
apids
[
napid
]
;
...
...
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