3

I found this question about what's the maximum PID for Linux and my question is exactly the same for OSX :

OSX doesn't seem to have the /proc/sys/kernel/pid_max file containing this value on Linux.

Is there an equivalent file or an other way to find out what is the range of PIDs on an OSX system?

vmonteco
  • 14,136
  • 15
  • 55
  • 86

1 Answers1

3

The maximum PID on macOS is 99998.

Unlike on Linux, this value is not tunable. I'm not aware of any way to retrieve it in a program; the only assumption you should make is that the value of a process ID will fit into the pid_t type.