Re: OT: socket question
Re: OT: socket question
- Subject: Re: OT: socket question
- From: Andrei Tchijov <email@hidden>
- Date: Thu, 27 Apr 2006 14:50:57 -0400
from command line it is easy
lsof
But programmatically ... definitely possible. I wonder if lsof is
part of Darwin (so you can take a look into the source)
On Apr 27, 2006, at 2:47 PM, Ondra Cada wrote:
Oh, this
... I need a way to determine whether the ... application is
running or not
reminded me of a problem I have, so I boldly dare to ask even if it
is not quite Cocoa-specific (sorry, but I bumped into it in a full-
Cocoa app, which uses exclusively NSFileHandle to operate sockets :))
Is there a way in Mac OS X to get the PID of the other side of a
socket? The socket is a local AF_UNIX, thus the question makes
sense: if the connection runs, there is bound to be a local peer
process (which I might need to kill if it sends garbage over the
socket, and that's why I am trying to find the PID). Though, I
haven't found any solution yet (google provided a number of linux
hacks, and that's all).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden