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

no lsof on OpenBSD #428

Open
marcespie opened this issue Jun 29, 2019 · 4 comments
Open

no lsof on OpenBSD #428

marcespie opened this issue Jun 29, 2019 · 4 comments
Assignees

Comments

@marcespie
Copy link

Something fairly similar can be done using fstat, though.

Questions remain:

  • is it only OpenBSD ? I kind-of-think it might apply to NetBSD/FreeBSD/Dragonfly as well.

Depending on that, there might be some extra IS_ constants

Or just maybe, try to run either of lsof or fstat you can ? and parse the results differently.

Will probably be more sturdy on any Unix...

Anyway, here's the fstat code.

Looking forward, making it work better. Sorry to not have a full patch yet.

I can look into it further if you don't have time.

patch.txt

@teodesian
Copy link
Owner

Forgive the tardy response.

Thanks for the starter patch, I'll look at incorporating something like it soon to get this all working on *bsd.

@teodesian
Copy link
Owner

ok, so the approach seems to be use fstat instead of lsof.

I think I'll use dan's Unix::PID::get_pidof() instead

@teodesian
Copy link
Owner

Hmm, there's no real lsof::PP though.

There is this however:

https://www.cpan.org/authors/id/J/JA/JAMSHAID/scripts/lsof-1.2.pl

Maybe I'll make a module out of that.

@marcespie
Copy link
Author

marcespie commented Oct 20, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants