projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6043679
)
main: no need to set errno manually
author
Alexander Kuleshov
<kuleshovmail@gmail.com>
Tue, 16 Feb 2016 12:42:45 +0000
(18:42 +0600)
committer
Alexander Kuleshov
<kuleshovmail@gmail.com>
Tue, 16 Feb 2016 12:56:15 +0000
(18:56 +0600)
If we are not PID 1 and started as init, we executing systemctl
with execv(). Here no need to set errno manually, because in a
failure case, because the execv() anyway will set errno depends
on a error.
src/core/main.c
patch
|
blob
|
history
diff --git
a/src/core/main.c
b/src/core/main.c
index
e208857
..
c725a68
100644
(file)
--- a/
src/core/main.c
+++ b/
src/core/main.c
@@
-1313,7
+1313,6
@@
int main(int argc, char *argv[]) {
/* This is compatibility support for SysV, where
* calling init as a user is identical to telinit. */
- errno = -ENOENT;
execv(SYSTEMCTL_BINARY_PATH, argv);
log_error_errno(errno, "Failed to exec " SYSTEMCTL_BINARY_PATH ": %m");
return 1;