How to find out if a file is open

Hi all,

is there a way to find out if a file is opened by any process just by
filename?

Thanks in advice

Jens

What OS?

“Jens Benner” <benner@digitask.de> wrote in message
news:39ACC0DE.575B8CF0@digitask.de

Hi all,

is there a way to find out if a file is opened by any process just by
filename?

Thanks in advice

Jens

Jens Benner wrote:

Hi all,

is there a way to find out if a file is opened by any process just by
filename?

Hi,
I don’t know in qnx but in unix

fuser -k -x -u the_file

Zoil

From the command line:

sin file

or programatically use:

fsys_fdinfo()

Sam

Previously, Jens Benner wrote in comp.os.qnx:

Hi all,

is there a way to find out if a file is opened by any process just by
filename?

Thanks in advice

Jens


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

(qnx 4) This works sometimes - depending on how many files are open and
how big Fsys’s name cache is. You will see “//1/…” for files whose
name Fsys has forgotten.

Sam Roberts wrote:

From the command line:

sin file

or programatically use:

fsys_fdinfo()

Sam

Previously, Jens Benner wrote in comp.os.qnx:
Hi all,

is there a way to find out if a file is opened by any process just by
filename?

Thanks in advice

Jens


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