What are the possible return values of kill() system call?
Kill()
system call is used to send signals to any processes.
This method returns the following return values :
* Returns 0 : It implies that the process exists with the given pid and the system allows sending signals to it.
* Return -1 and errno==ESRCH : It implies that there is no existence of the process with specified pid. There may also exist some security reasons which as denying the existence of the pid.
* Return -1 and errno==EPERM : It implies that there is no permit available for the process to be killed. The error also detects whether the process is present or not.
* EINVAl : it implies an invalid signal.