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
d2158fea
Commit
d2158fea
authored
2 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
fix fdholder update
parent
d5a4c0c5
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/sanitize/sanitize_init.c
+8
-35
8 additions, 35 deletions
src/lib66/sanitize/sanitize_init.c
with
8 additions
and
35 deletions
src/lib66/sanitize/sanitize_init.c
+
8
−
35
View file @
d2158fea
...
...
@@ -50,6 +50,9 @@ void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, resolve_s
int
is_supervised
=
0
,
is_init
;
unsigned
int
pos
=
0
,
nsv
=
0
;
unsigned
int
real
[
alen
]
;
unsigned
int
msg
[
areslen
]
;
memset
(
msg
,
0
,
areslen
)
;
/* nothing to do */
if
(
!
alen
)
...
...
@@ -83,6 +86,7 @@ void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, resolve_s
if
(
!
earlier
&&
!
is_supervised
)
{
log_warn
(
name
,
" already initialized -- ignore it"
)
;
msg
[
aresid
]
=
1
;
continue
;
}
...
...
@@ -154,38 +158,6 @@ void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, resolve_s
if
(
ftrigr_wait_and_g
(
&
fifo
,
ids
,
nids
,
&
deadline
)
<
0
)
log_dieusys
(
LOG_EXIT_SYS
,
"wait for events"
)
;
{
/** for now, i don't know exactly why
* but if the fdholder daemon isn't reloaded
* the up process hangs at a service logger start.
* Sending a -ru to fdholder solve the issue.*/
char
tfmt
[
UINT32_FMT
]
;
tfmt
[
uint_fmt
(
tfmt
,
3000
)]
=
0
;
pid_t
pid
;
int
wstat
;
char
*
socket
=
ares
[
real
[
0
]].
sa
.
s
+
ares
[
real
[
0
]].
live
.
fdholderdir
;
char
const
*
newargv
[
8
]
;
unsigned
int
m
=
0
;
newargv
[
m
++
]
=
"s6-svc"
;
newargv
[
m
++
]
=
"-ru"
;
newargv
[
m
++
]
=
"-T"
;
newargv
[
m
++
]
=
tfmt
;
newargv
[
m
++
]
=
"--"
;
newargv
[
m
++
]
=
socket
;
newargv
[
m
++
]
=
0
;
log_trace
(
"sending -ru signal to: "
,
socket
)
;
pid
=
child_spawn0
(
newargv
[
0
],
newargv
,
(
char
const
*
const
*
)
environ
)
;
if
(
waitpid_nointr
(
pid
,
&
wstat
,
0
)
<
0
)
log_dieusys
(
LOG_EXIT_SYS
,
"wait for reload of the fdholder daemon"
)
;
if
(
wstat
)
log_dieu
(
LOG_EXIT_SYS
,
"reload fdholder service; "
,
socket
)
;
}
}
}
...
...
@@ -215,14 +187,15 @@ void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, resolve_s
}
else
if
(
ares
[
aresid
].
type
==
TYPE_BUNDLE
||
ares
[
aresid
].
type
==
TYPE_MODULE
)
{
/** Consider Module and Bundle as supervised */
if
(
!
state_messenger
(
sa
+
ares
[
aresid
]
.
path
.
home
,
name
,
STATE_FLAGS_ISSUPERVISED
,
STATE_FLAGS_TRUE
))
if
(
!
state_messenger
(
&
ares
[
aresid
],
STATE_FLAGS_ISSUPERVISED
,
STATE_FLAGS_TRUE
))
log_dieusys
(
LOG_EXIT_SYS
,
"send message to state of: "
,
name
)
;
}
if
(
!
state_messenger
(
sa
+
ares
[
aresid
]
.
path
.
home
,
name
,
STATE_FLAGS_TOINIT
,
STATE_FLAGS_FALSE
))
if
(
!
state_messenger
(
&
ares
[
aresid
],
STATE_FLAGS_TOINIT
,
STATE_FLAGS_FALSE
))
log_dieusys
(
LOG_EXIT_SYS
,
"send message to state of: "
,
name
)
;
log_info
(
"Initialized successfully: "
,
name
)
;
if
(
!
msg
[
aresid
])
log_info
(
"Initialized successfully: "
,
name
)
;
}
ftrigr_end
(
&
fifo
)
;
...
...
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