Skip to content
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

[BUG] fd numbers also truncated in -F fd *output for other programs* #311

Open
stephane-chazelas opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@stephane-chazelas
Copy link

Describe the bug

I can (sort of) understand the truncation of the fd number (and asterisk alerting about it) in:

$ bash -c 'ulimit -n 20000; exec 12345<> /dev/null; lsof -w -ap "$$" /dev/null; exit'
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
bash    9385 chazelas *345u   CHR    1,3      0t0    5 /dev/null

Where the FD column has a fixed limited width that hadn't accounted for fds one day possibly be greater than 999 decades ago

But IMO, it doesn't make sense in the output for other programs where there's no reason for the width to be limited:

$ bash -c 'ulimit -n 20000; exec 12345<> /dev/null; lsof -w -F fd -ap "$$" /dev/null; exit'
p9431
f*345

Expected:

$ bash -c 'ulimit -n 20000; exec 12345<> /dev/null; lsof -w -F fd -ap "$$" /dev/null; exit'
p9431
f12345

(reproduced with lsof from Ubuntu 22.04 and current git HEAD (e30113e)).

@jiegec jiegec added the bug Something isn't working label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants