Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Re: Re: Re: •Re: open file descriptors

by exussum0 (Vicar)
on Dec 13, 2003 at 23:01 UTC ( #314569=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: •Re: open file descriptors
in thread open file descriptors

Well, in linux, you can do something like find

/proc/123/fd/ -type f | wc -l

FreeBSD doesn't have fd and osx doesn't even have /proc :(

Play that funky music white boy..

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: •Re: open file descriptors
by etcshadow (Priest) on Dec 14, 2003 at 00:15 UTC
    Yeah I'm familiar with linux's proc filesystem (I love it, in fact), but this question is about writing a portable application. Also, I reallize that system calls are not necessarily portable from one O/S to another... that's why psuedo system calls as perl builtins are so nice. Like: I don't have to know what each O/S's system call is for deleting a file, but I know that in perl, unlink does the trick.

    Not an editor command: Wq

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://314569]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-10-21 23:44 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (271 votes). Check out past polls.