What are the different outputs from Kill command in Unix?

Kill command in Unix can return following outputs:

  • 0: It means Kill command was successful
  • -1: When we get -1 from Kill command it shows that there was some error. In addition to -1 we get EPERM or ESRCH in output.

EPERM denotes that system does not permit the process to be killed.

ESRCH denotes that process with PID mentioned in Kill command does not exist anymore. Or due to security restrictions we cannot access that process.

Leave a Reply

Your email address will not be published. Required fields are marked *