Thank you, Roland. I am using your idea, iterating over fd with
> fcntl( fd, F_GETPATH, filePath )
I think that it’s less fragile than what I was thinking of doing, less code,
and it works :)
On 2015 Feb 07, at 18:59, Roland King wrote:
> Well if you can figure out which file descriptors are
> On 7 Feb 2015, at 23:26, Jerry Krinock wrote:
>
> I need a method which will give me the paths of all files which the current
> OS X process (*) has open. Yes, this is for a benevolent hack and no, I am
> not sandboxed.
>
> I’m considering using getpid() and passing the result to /usr/sbin
Any idea what the Activity Monitor application uses for the Open Files and
Ports when you inspect an application/process?
On Feb 7, 2015, at 6:26 PM, Jerry Krinock wrote:
> I need a method which will give me the paths of all files which the current
> OS X process (*) has open. Yes, this is fo
> On 8 Feb 2015, at 07:26, Jerry Krinock wrote:
>
> I need a method which will give me the paths of all files which the current
> OS X process (*) has open. Yes, this is for a benevolent hack and no, I am
> not sandboxed.
>
> I’m considering using getpid() and passing the result to /usr/sbin
I need a method which will give me the paths of all files which the current OS
X process (*) has open. Yes, this is for a benevolent hack and no, I am not
sandboxed.
I’m considering using getpid() and passing the result to /usr/sbin/lsof with a
-p option. This works very fast in Terminal.app,