FIle Name ?

Is there a function like ttyname() that returns the name of a file from an
open file descriptor?

Previously, Bill at Sierra Design wrote in qdn.public.qnx4:

Is there a function like ttyname() that returns the name of a file from an
open file descriptor?

fsys_fdinfo()

Sam


Sam Roberts (sam@cogent.ca), Cogent Real-Time Systems (www.cogent.ca)

Hi Sam,

and thanks, but . . . how do I know the server’s pid?

Sam Roberts <sam@cogent.ca> wrote in message
news:Voyager.000726151002.16187A@sam.cogent.ca

Previously, Bill at Sierra Design wrote in qdn.public.qnx4:
Is there a function like ttyname() that returns the name of a file from
an
open file descriptor?

fsys_fdinfo()

Sam


Sam Roberts (> sam@cogent.ca> ), Cogent Real-Time Systems (> www.cogent.ca> )

Bill at Sierra Design <BC@sierradesign.com> wrote:

Hi Sam,

and thanks, but . . . how do I know the server’s pid?

qnx_fd_query()

Sam Roberts <> sam@cogent.ca> > wrote in message
news:> Voyager.000726151002.16187A@sam.cogent.ca> …
Previously, Bill at Sierra Design wrote in qdn.public.qnx4:
Is there a function like ttyname() that returns the name of a file from
an
open file descriptor?

fsys_fdinfo()

Sam


Sam Roberts (> sam@cogent.ca> ), Cogent Real-Time Systems (> www.cogent.ca> )

Bill at Sierra Design <BC@sierradesign.com> wrote:

Is there a function like ttyname() that returns the name of a file from an
open file descriptor?

How about fstat()?

-David

Previously, David Gibbs wrote in qdn.public.qnx4:

Bill at Sierra Design <> BC@sierradesign.com> > wrote:
Is there a function like ttyname() that returns the name of a file from an
open file descriptor?

How about fstat()?

struc stat doesn’t appear to contain a field for the path, did you
misread the question, or is there some magic here?

Sam


Sam Roberts (sam@cogent.ca), Cogent Real-Time Systems (www.cogent.ca)

Sam Roberts <sam@cogent.ca> wrote:

Previously, David Gibbs wrote in qdn.public.qnx4:
Bill at Sierra Design <> BC@sierradesign.com> > wrote:
Is there a function like ttyname() that returns the name of a file from an
open file descriptor?

How about fstat()?

struc stat doesn’t appear to contain a field for the path, did you
misread the question, or is there some magic here?

No, I forgot what was in the struct stat – I thought it included
a file name. My mistake.

-David

Actually, for my purposes I don’t need the fullpath. Just the filename is
enough. Thanks all!

David Gibbs <dagibbs@qnx.com> wrote in message
news:8ls9ub$n5m$1@inn.qnx.com

Sam Roberts <> sam@cogent.ca> > wrote:
Previously, David Gibbs wrote in qdn.public.qnx4:
Bill at Sierra Design <> BC@sierradesign.com> > wrote:
Is there a function like ttyname() that returns the name of a file
from an
open file descriptor?

How about fstat()?

struc stat doesn’t appear to contain a field for the path, did you
misread the question, or is there some magic here?

No, I forgot what was in the struct stat – I thought it included
a file name. My mistake.

-David

David Gibbs <dagibbs@qnx.com> wrote:
: Sam Roberts <sam@cogent.ca> wrote:
:> Previously, David Gibbs wrote in qdn.public.qnx4:
:>> Bill at Sierra Design <BC@sierradesign.com> wrote:
:>> > Is there a function like ttyname() that returns the name of a file from an
:>> > open file descriptor?
:>>
:>> How about fstat()?

:> struc stat doesn’t appear to contain a field for the path, did you
:> misread the question, or is there some magic here?

: No, I forgot what was in the struct stat – I thought it included
: a file name. My mistake.

What you are looking for is iofdinfo() … which is not
yet supported by all of the managers. It’s support in the
resource manager framework is relatively new.

Thomas

Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf

Previously, Thomas Fletcher wrote in qdn.public.qnx4:

What you are looking for is iofdinfo() … which is not
yet supported by all of the managers. It’s support in the
resource manager framework is relatively new.

I think you wandered into the wrong group, Thomas! Unless
you’re back-porting this to QNX4…

Sam


Sam Roberts (sam@cogent.ca), Cogent Real-Time Systems (www.cogent.ca)

Sam Roberts <sam@cogent.ca> wrote:
: Previously, Thomas Fletcher wrote in qdn.public.qnx4:
:> What you are looking for is iofdinfo() … which is not
:> yet supported by all of the managers. It’s support in the
:> resource manager framework is relatively new.

: I think you wandered into the wrong group, Thomas! Unless
: you’re back-porting this to QNX4…

Dang! Sorry about that folks! I just re-configured
my news client and thought that I was reading this
from somewhere else … consider my comments to be
Neutronified.

Thomas

Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf