What is kill()? Explain its possible return values.kill() is a system call which stops a process. The return values of kill() are:
- 0 – Process is existing with the given PID, and signals can be sent to it. - -1 – The ‘errno == ESRCH’ is true. This implies the non-existence of a process with a given PID or causing the denial of system by security enhancements for its existence. - -1 – The ‘errno == EPERM’ is true. This implies that the kill proess will not be allowed by the system with the given PID, which implies that the process exists or the enhancements are present by draconian security. - -1 – At times some other values returned by ‘errno’.
|