MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: Question for the list (Semi-OT)
On Sat, 15 Aug 1998, Nathan F Yospe wrote:
> What I'm looking for is a way, on a generalized unix platform, to track the
> process that is currently binding a descriptor to a socket, and return that
> process's pid, without su access...
>
> For example, while on the host machine, I'd like to be able to make a call,
> int p_id = get_owner(short portnum); Where I say p_id = get_owner(5000). It
> seems like there should be some way to recover this, but... *shrug*
Without su access could be hairy.
lsof (ftp://vic.cc.purdue.edu/pub/tools/unix/lsof) will do it, but it
needs access to kernel memory on most systems. I think that it can work
entirely from /proc under recent linux kernels, although you need read
access to the appropriate /proc/nnn/* entries.
I suspect the answer is "no" for a generic solution, and "probably no" for
most system-specific solutions.
If you're writing code for the process in question, of course, you could
maintain a database of port information somewhere yourself.
-O
- Thread context:
- [MUD-Dev] Re: UBE/high: Re: FW: UBE/high: Re: W IRED: Kilers, (continued)
- [MUD-Dev] Re: UBE/high: Re: FW: UBE/high: Re: W IRED: Kilers have more fun,
S. Patrick Gallaty patrick#gric,com, Tue 18 Aug 1998, 00:48 GMT
- [MUD-Dev] Question for the list (Semi-OT),
Nathan F Yospe yospe#hawaii,edu, Sat 15 Aug 1998, 23:27 GMT
- [MUD-Dev] RE: UBE/high: Re: W IRED: Kilers have more fun,
Koster, Raph rkoster#origin,ea.com, Sat 15 Aug 1998, 03:34 GMT
[ Other Periods
| Other mailing lists
| Search
]