On Thu, Jul 20, 2006 at 03:02:19AM +0900, Eric Hodel wrote:
> On FreeBSD uid_t and gid_t are unsigned integers.  Searching google  
                                 ^^^^^^^^
Surely this is a typo? pid_t must be signed:

  http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html

  "blksize_t, pid_t, and ssize_t shall be signed integer types."

> for 'negative uid' reveals that other operating systems also allow  
> negative uids.

Other __UNIX__ operating systems? Are you sure?

Among other things, this would make the kill(2) system call not work:

  http://www.opengroup.org/onlinepubs/009695399/functions/kill.html

Process IDs are positive. It is true that the pid_t type must allow
negative values, but not when a pid_t describes a process ID.

Btw, presence of -45 in /etc/passwd doesn't mean that a running process
will ever actually have negative pid. I'll believe that when I see
the a ps listing showing it.

Sam