Jason8 <ja*********@gmail.comwrites:
Does anyone know if you can lookup the PID that owns a socket (based
on port number) programmatically? I know most systems have LSOF for
this but I'd like it to be more portable and not call an external
program.
The C language itself doesn't define PIDs, sockets, or port numbers.
Try comp.unix.programmer.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"