]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pidref: make signal sending calls take const PidRef
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Oct 2023 12:38:07 +0000 (14:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 18 Oct 2023 12:38:07 +0000 (14:38 +0200)
src/basic/pidref.c
src/basic/pidref.h

index e662f62af6d107f62e9d0630e521234ca5c575f0..db58a3d809d61e5f2ac8ea689273ec292be8d4dd 100644 (file)
@@ -186,7 +186,7 @@ int pidref_new_from_pid(pid_t pid, PidRef **ret) {
         return 0;
 }
 
-int pidref_kill(PidRef *pidref, int sig) {
+int pidref_kill(const PidRef *pidref, int sig) {
 
         if (!pidref)
                 return -ESRCH;
@@ -200,7 +200,7 @@ int pidref_kill(PidRef *pidref, int sig) {
         return -ESRCH;
 }
 
-int pidref_kill_and_sigcont(PidRef *pidref, int sig) {
+int pidref_kill_and_sigcont(const PidRef *pidref, int sig) {
         int r;
 
         r = pidref_kill(pidref, sig);
@@ -213,7 +213,7 @@ int pidref_kill_and_sigcont(PidRef *pidref, int sig) {
         return 0;
 }
 
-int pidref_sigqueue(PidRef *pidref, int sig, int value) {
+int pidref_sigqueue(const PidRef *pidref, int sig, int value) {
 
         if (!pidref)
                 return -ESRCH;
index e1fdac27005d06a78dcfcedc448415f77170e991..61d091a34443dca3bf567c399bff8ebd9d90f0e9 100644 (file)
@@ -51,9 +51,9 @@ int pidref_dup(const PidRef *pidref, PidRef **ret);
 
 int pidref_new_from_pid(pid_t pid, PidRef **ret);
 
-int pidref_kill(PidRef *pidref, int sig);
-int pidref_kill_and_sigcont(PidRef *pidref, int sig);
-int pidref_sigqueue(PidRef *pidfref, int sig, int value);
+int pidref_kill(const PidRef *pidref, int sig);
+int pidref_kill_and_sigcont(const PidRef *pidref, int sig);
+int pidref_sigqueue(const PidRef *pidfref, int sig, int value);
 
 int pidref_verify(const PidRef *pidref);