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
b9d0fd42
Commit
b9d0fd42
authored
1 year ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
fix log redirection
parent
900305d3
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/parse/parse_compute_resolve.c
+6
-30
6 additions, 30 deletions
src/lib66/parse/parse_compute_resolve.c
with
6 additions
and
30 deletions
src/lib66/parse/parse_compute_resolve.c
+
6
−
30
View file @
b9d0fd42
...
...
@@ -187,7 +187,10 @@ static void compute_wrapper_scripts(resolve_service_t *res, resolve_service_addo
res
->
sa
.
s
+
res
->
name
,
SS_LOG_SUFFIX
"
\"\n
"
,
\
"fdswap 0 1
\n
"
)
;
auto_strings
(
run
+
FAKELEN
,
"fdmove -c 2 1
\n
"
)
;
if
(
!
res
->
logger
.
want
)
/** if logger was asked a redirection of stdout is made (see below).
* in this case we need to move stderr AFTER stdout */
auto_strings
(
run
+
FAKELEN
,
"fdmove -c 2 1
\n
"
)
;
/** environ */
...
...
@@ -199,8 +202,9 @@ static void compute_wrapper_scripts(resolve_service_t *res, resolve_service_addo
/** log redirection for oneshot service */
if
(
res
->
logger
.
want
&&
res
->
type
==
TYPE_ONESHOT
)
{
auto_strings
(
run
+
FAKELEN
,
"execl-toc"
,
" -d "
,
res
->
sa
.
s
+
res
->
logger
.
destination
,
" -m 0755
\n
"
)
;
//
auto_strings(run + FAKELEN, "execl-toc", " -d ", res->sa.s + res->logger.destination, " -m 0755\n") ;
auto_strings
(
run
+
FAKELEN
,
"redirfd -a 1 "
,
res
->
sa
.
s
+
res
->
logger
.
destination
,
"/current
\n
"
)
;
auto_strings
(
run
+
FAKELEN
,
"fdmove -c 2 1
\n
"
)
;
}
/** runas */
...
...
@@ -483,37 +487,9 @@ void parse_compute_resolve(unsigned int idx, resolve_service_t *ares, unsigned i
res
->
live
.
servicedir
=
compute_live_servicedir
(
wres
,
info
)
;
/* scandir */
/**
*
* /run/66/state/uid/service_name/scandir/service_name
*
* Symlink name:
*
* /run/66/scandir/uid/service_name
*
* Symlink poiting to:
*
* /run/66/state/uid/service_name
*
* which is a symlink pointing to
*
* /var/lib/66/system/servicedirs/svc/service_name
*
* which is a symlink pointing to:
*
* /run/66/scandir/uid/
* */
res
->
live
.
scandir
=
compute_scan_dir
(
wres
,
info
)
;
/* state */
/**
*
* see above:
*
* /run/66/state/uid/service_name/state
* /run/66/state/uid/service_name/event
* /run/66/state/uid/service_name/supervise
* */
res
->
live
.
statedir
=
compute_state_dir
(
wres
,
info
,
SS_STATE
+
1
)
;
/* event */
...
...
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