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
3753da34
Commit
3753da34
authored
1 year ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
optimize start time
parent
38d3aef7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/lib66/sanitize/sanitize_fdholder.c
+1
-1
1 addition, 1 deletion
src/lib66/sanitize/sanitize_fdholder.c
src/lib66/sanitize/sanitize_init.c
+11
-1
11 additions, 1 deletion
src/lib66/sanitize/sanitize_init.c
src/lib66/svc/svc_unsupervise.c
+2
-0
2 additions, 0 deletions
src/lib66/svc/svc_unsupervise.c
with
14 additions
and
2 deletions
src/lib66/sanitize/sanitize_fdholder.c
+
1
−
1
View file @
3753da34
...
...
@@ -182,7 +182,7 @@ int sanitize_fdholder(resolve_service_t *res, ss_state_t *sta, uint32_t flag, ui
if
(
!
openwritenclose_unsafe
(
file
,
list
.
s
,
list
.
len
))
log_warnusys_return
(
LOG_EXIT_ZERO
,
"write file: "
,
file
)
;
svc_send_fdholder
(
socket
,
"twR"
)
;
//
svc_send_fdholder(socket, "twR") ;
stralloc_free
(
&
list
)
;
}
...
...
This diff is collapsed.
Click to expand it.
src/lib66/sanitize/sanitize_init.c
+
11
−
1
View file @
3753da34
...
...
@@ -41,6 +41,7 @@
#include
<66/enum.h>
#include
<66/sanitize.h>
#include
<66/symlink.h>
#include
<66/svc.h>
void
cleanup
(
struct
resolve_hash_s
*
hash
,
unsigned
int
alen
)
{
...
...
@@ -64,6 +65,10 @@ void cleanup(struct resolve_hash_s *hash, unsigned int alen)
unlink
(
pres
->
sa
.
s
+
pres
->
live
.
scandir
)
;
}
if
(
alen
)
svc_send_fdholder
(
hash
[
0
].
res
.
sa
.
s
+
hash
[
0
].
res
.
live
.
fdholderdir
,
"twR"
)
;
errno
=
e
;
}
...
...
@@ -76,7 +81,7 @@ void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, struct re
return
;
ftrigr_t
fifo
=
FTRIGR_ZERO
;
uint32_t
earlier
;
uint32_t
earlier
,
fdh
=
0
;
gid_t
gid
=
getgid
()
;
int
is_supervised
=
0
;
unsigned
int
pos
=
0
,
nsv
=
0
,
msg
[
alen
]
;
...
...
@@ -173,6 +178,8 @@ void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, struct re
cleanup
(
toclean
,
pos
)
;
log_dieusys
(
LOG_EXIT_SYS
,
"create fifo: "
,
pres
->
sa
.
s
+
pres
->
live
.
eventdir
)
;
}
fdh
=
1
;
}
if
(
!
state_write
(
&
sta
,
pres
))
{
...
...
@@ -183,6 +190,9 @@ void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, struct re
real
[
nsv
++
]
=
*
hash
;
}
if
(
!
earlier
&&
fdh
&&
nsv
)
svc_send_fdholder
(
real
[
0
].
res
.
sa
.
s
+
real
[
0
].
res
.
live
.
fdholderdir
,
"twR"
)
;
/**
* scandir is already running, we need to synchronize with it
* */
...
...
This diff is collapsed.
Click to expand it.
src/lib66/svc/svc_unsupervise.c
+
2
−
0
View file @
3753da34
...
...
@@ -34,6 +34,8 @@ static void sanitize_it(resolve_service_t *res)
sanitize_fdholder
(
res
,
&
sta
,
STATE_FLAGS_FALSE
,
0
)
;
svc_send_fdholder
(
res
->
sa
.
s
+
res
->
live
.
fdholderdir
,
"twR"
)
;
state_set_flag
(
&
sta
,
STATE_FLAGS_TOUNSUPERVISE
,
STATE_FLAGS_TRUE
)
;
state_set_flag
(
&
sta
,
STATE_FLAGS_ISUP
,
STATE_FLAGS_FALSE
)
;
...
...
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