What does ESRCH mean?

POSIX kill documents the "search" connotation:

[ESRCH]
No process or process group can be found corresponding to that specified by pid.

The previous issue (2004) gave in the rationale more information:

Some implementations provide semantic extensions to the kill() function when the absolute value of pid is greater than some maximum, or otherwise special, value. Negative values are a flag to kill(). Since most implementations return [ESRCH] in this case, this behavior is not included in this volume of IEEE Std 1003.1-2001, although a conforming implementation could provide such an extension.


The string ESRCH looks cryptic, but after looking at the other errors and their strings: (taken from http://pubs.opengroup.org/onlinepubs/9699919799/functions/kill.html)

  • [EINVAL] The value of the sig argument is an invalid or unsupported signal number.
  • [EPERM] The process does not have permission to send the signal to any receiving process.

Seems logical that E stands for error, INVAL for invalid and PERM for permission. In the same logical line, SRCH stands for search.

Error searching pid/pid group.