What\'s the logic behind calls like getpid() returning a value of type pid_t instead of an unsigned int? Or int? How does
One thing to point out, in most answers I saw something along the lines of "using pid_t makes the code work on different systems", which is not necessarily true.
I believe the precise wording should be: it makes the code 'compile' on different systems.
As, for instance, compiling the code on a system that uses 32-bit pid_t will produce a binary that will probably break if run on another system that uses 64-bit pid_t.