sysmgr

a simplistic service supervisor
git clone git://git.ckyln.com/~cem/sysmgr.git
Log | Files | Refs | README | LICENSE

commit 75b69eba5d33e252822656b1bda2590d5830bc98
parent ed796688bdeed6db0fb53db1146ae4baf0bf4228
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 16 Sep 2020 19:12:11 +0300

checkprocess(): Don't die on permission errors

Diffstat:
Mutils/util.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/utils/util.c b/utils/util.c @@ -59,7 +59,12 @@ checkprocess(int pid) else { switch (errno) { case 1: - die("kill:"); + /* EPERM is only produced if the process exists, but the + * user running the program doesn't have the permissions + * to kill the process. We can safely assume that the + * process exists in this case and return 0. + */ + return 0; break; default: perror("kill");