Selenium-Remote-Driver icon indicating copy to clipboard operation
Selenium-Remote-Driver copied to clipboard

no lsof on OpenBSD

Open marcespie opened this issue 6 years ago • 4 comments

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

marcespie avatar Jun 29 '19 19:06 marcespie

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 avatar Jul 29 '19 21:07 teodesian

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 avatar Oct 20 '20 16:10 teodesian

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.

teodesian avatar Oct 20 '20 16:10 teodesian

On Tue, Oct 20, 2020 at 09:21:46AM -0700, George S. Baugh wrote:

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.

Err... OpenBSD doesn't have /proc... at all

there is no portable way to get that information. Why don't you just use fstat ?...

marcespie avatar Oct 20 '20 20:10 marcespie