Skip to content

Commit

Permalink
fixed job killing
Browse files Browse the repository at this point in the history
  • Loading branch information
Biscuitmunch committed Mar 30, 2022
1 parent 401a22b commit aa3df38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ash.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,14 @@ void killCertainProcess(char *processNumInput)
char *extraString = calloc(1000, 1);
long processNum = strtol(words, &extraString, 10);


if (processNum == 0)
{
kill(mostRecentJob, SIGKILL);
deleteJob(processCounter);
}
else
{
kill(jobIDs[processNum], SIGKILL);
deleteJob(processNum);
}

}
Expand Down

0 comments on commit aa3df38

Please sign in to comment.