From fcc376b861e2d69dae408f01597597e7fc6cbb33 Mon Sep 17 00:00:00 2001 From: albert <> Date: Mon, 24 Mar 2008 05:57:28 +0000 Subject: [PATCH] note UNIX standard self-conflict --- skill.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/skill.c b/skill.c index 783004df..96cc386e 100644 --- a/skill.c +++ b/skill.c @@ -309,6 +309,14 @@ no_more_args: pid = strtol(argv[argc],&endp,10); if(!*endp){ if(!kill((pid_t)pid,signo)) continue; + // The UNIX standard contradicts itself. If at least one process + // is matched for each PID (as if processes could share PID!) and + // "the specified signal was successfully processed" (the systcall + // returned zero?) for at least one of those processes, then we must + // exit with zero. Note that an error might have also occured. + // The standard says we return non-zero if an error occurs. Thus if + // killing two processes gives 0 for one and EPERM for the other, + // we are required to return both zero and non-zero. Quantum kill??? exitvalue = 1; continue; }