4 ms·
In 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 spec
by jabl 8y ago
In 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