Following this question:
https://stackoverflow.com/q/57063877/1593077
I went at looked at the horrid source of lsof: https://github.com/lsof-org/lsof
And I'd like to say - I'd personally pay a few bucks to the brave soul who rewrites that mess in C++ with proper library use for parsing command-line options, output formatting, etc., no jumble of globals, no more obscure-acronym variable names (Dstkx, Fcntx) etc.