What\'s the logic behind calls like getpid() returning a value of type pid_t instead of an unsigned int? Or int? How does
On different platforms and operating systems, different types (pid_t for example) might be 32 bits (unsigned int) on a 32-bit machine or 64 bits (unsigned long) on a 64-bit machine. Or, for some other reason, an operating system might choose to have a different size. Additionally, it makes it clear when reading the code that this variable represents an "object", rather than just an arbitrary number.