-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Column User
is printed as signed int
#1576
Comments
|
|
It's not about whether negative user ID makes sense to you, it's about whether the OS allows user ID to overflow the signed integer limit (that is, 2^31 - 1). If the OS never permits UIDs above (2^31 - 1), then it makes no difference printing the UID in signed integer or unsigned integer. |
https://en.wikipedia.org/wiki/User_identifier states it is a 32bit integer According to this in 2001 Linux switched to 32bit and it is unsigned. Now - assuming there is a reason to have a signed UID - it still breaks the output. |
to quote your source (updated document) https://pubs.opengroup.org/onlinepubs/9799919799/
It states to be an integer - but for blkcnt_t it is specific defined as a signed integer. So one can assume that uid_t may be unsigned. |
What's the reason you have a UID in that overflowed range in the first place?
No. If any OS defined it to be signed, we need to follow. htop is not a Linux-only program. Any Unix-like OS can define Note that I'm not arguing whether |
The UID mapping should handle negative numbers if |
Hi
Latest version of htop prints the UserID in column User as signed integer if no username can be found.
UserID is an unsigned integer.
This disrupts that line as the
-
character moves everything one character to the right.The text was updated successfully, but these errors were encountered: