Linux - What is kill()? Explain its possible return values.

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’.
Linux - Explain the steps that a shell follows while processing a command
Explain the steps that a shell follows while processing a command - The sequence of executing commands by shell are as follows:.......
Linux - Difference between cmp and diff commands
Difference between cmp and diff commands - Byte by byte comparision performed for two files comparision and displays the first mismatch byte.........
Linux - What is the use of ‘grep’ command? Provide an example
What is the use of ‘grep’ command? - Grep stands for regular expression. ‘grep’ command is used to find the patterns in a text file provided by the user.......
Post your comment