Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
systemd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
steam
systemd
Commits
0ca3f374
Commit
0ca3f374
authored
Jun 19, 2010
by
Lennart Poettering
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initctl: add some checks before starting up
parent
f5a3628c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
src/initctl.c
src/initctl.c
+10
-0
src/logger.c
src/logger.c
+10
-0
No files found.
src/initctl.c
View file @
0ca3f374
...
...
@@ -336,6 +336,16 @@ int main(int argc, char *argv[]) {
Server
server
;
int
r
=
3
,
n
;
if
(
getppid
()
!=
1
)
{
log_error
(
"This program should be invoked by init only."
);
return
1
;
}
if
(
argc
>
1
)
{
log_error
(
"This program does not take arguments."
);
return
1
;
}
log_set_target
(
LOG_TARGET_SYSLOG_OR_KMSG
);
log_parse_environment
();
...
...
src/logger.c
View file @
0ca3f374
...
...
@@ -535,6 +535,16 @@ int main(int argc, char *argv[]) {
Server
server
;
int
r
=
3
,
n
;
if
(
getppid
()
!=
1
)
{
log_error
(
"This program should be invoked by init only."
);
return
1
;
}
if
(
argc
>
1
)
{
log_error
(
"This program does not take arguments."
);
return
1
;
}
log_set_target
(
LOG_TARGET_SYSLOG_OR_KMSG
);
log_parse_environment
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment