summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mount.c4
-rw-r--r--src/service.c4
-rw-r--r--src/socket.c4
-rw-r--r--src/swap.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/mount.c b/src/mount.c
index d837041475..d26d45f038 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -1769,12 +1769,12 @@ static int mount_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError
if (who == KILL_MAIN) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "Mount units have no main processes");
- return -EINVAL;
+ return -ESRCH;
}
if (m->control_pid <= 0 && who == KILL_CONTROL) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill");
- return -ENOENT;
+ return -ESRCH;
}
if (who == KILL_CONTROL || who == KILL_ALL)
diff --git a/src/service.c b/src/service.c
index 0b657679f7..646c093906 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3262,12 +3262,12 @@ static int service_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusErro
if (s->main_pid <= 0 && who == KILL_MAIN) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "No main process to kill");
- return -EINVAL;
+ return -ESRCH;
}
if (s->control_pid <= 0 && who == KILL_CONTROL) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill");
- return -ENOENT;
+ return -ESRCH;
}
if (who == KILL_CONTROL || who == KILL_ALL)
diff --git a/src/socket.c b/src/socket.c
index 3a7aa94036..64d1028d4f 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -2022,12 +2022,12 @@ static int socket_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError
if (who == KILL_MAIN) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "Socket units have no main processes");
- return -EINVAL;
+ return -ESRCH;
}
if (s->control_pid <= 0 && who == KILL_CONTROL) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill");
- return -ENOENT;
+ return -ESRCH;
}
if (who == KILL_CONTROL || who == KILL_ALL)
diff --git a/src/swap.c b/src/swap.c
index a0b1677645..6e41f9b68e 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -1278,12 +1278,12 @@ static int swap_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError *
if (who == KILL_MAIN) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "Swap units have no main processes");
- return -EINVAL;
+ return -ESRCH;
}
if (s->control_pid <= 0 && who == KILL_CONTROL) {
dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill");
- return -ENOENT;
+ return -ESRCH;
}
if (who == KILL_CONTROL || who == KILL_ALL)