mirror of
https://github.com/systemd/systemd
synced 2024-10-15 12:34:37 +00:00
userwork: use a better errno value
ESRCH is literally "No such process".
This commit is contained in:
parent
2e09b2235a
commit
c6cb9d9074
|
@ -553,7 +553,7 @@ static int run(int argc, char *argv[]) {
|
||||||
|
|
||||||
parent = getppid();
|
parent = getppid();
|
||||||
if (parent <= 1)
|
if (parent <= 1)
|
||||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Parent already died?");
|
return log_error_errno(SYNTHETIC_ERRNO(ESRCH), "Parent already died?");
|
||||||
|
|
||||||
if (kill(parent, SIGUSR2) < 0)
|
if (kill(parent, SIGUSR2) < 0)
|
||||||
return log_error_errno(errno, "Failed to kill our own parent: %m");
|
return log_error_errno(errno, "Failed to kill our own parent: %m");
|
||||||
|
|
Loading…
Reference in a new issue