hi im working in UNIX and what im doing here is storing the pid's into a queue and then using this process for killing X amount of pids, however when ever it reaches this point it always outputs " Killed" and kills the whole thing not the pid that is put into temp
i have changed kill(temp, SIGKILL); from kill( Queue[0], SIGKILL); to try make it work but no luck
Code:
temp = Queue[0];
kill(temp, SIGKILL);
for (i = 0; i < top; i++)
{
Queue[i] = Queue[i+1];
}
im sure im missing something obvious thanks any input would be greatly appreciated