3 ms·
Was the special treatment of -1 intended by the developers, or did somebody mix up signed -1 with unsigned 65535?
by kijin 8y ago
Was the special treatment of -1 intended by the developers, or did somebody mix up signed -1 with unsigned 65535?
- emmelaich 8y agoSee above - it was -2 or 65534. I think -2 is just easier to type and stands out more.
- jabl 8y agoIn POSIX, many functions return -1 to indicate errors. So I guess the value (uid_t) -1 was reserved to avoid confusion. Also some functions (chown()) allow specifying (uid_t) -1 or (gid_) -1 to mark an omitted argument. See https://en.wikipedia.org/wiki/User_identifier#Special_values https://en.wikipedia.org/wiki/User_identifier#Special_values
- JdeBP 8y agoSee https://superuser.com/a/706578/38062 https://superuser.com/a/706578/38062 .