Re: how to get the file name
- From: "bill pursell" <bill.pursell@xxxxxxxxx>
- Date: 6 Jan 2006 10:59:41 -0800
Måns Rullgård wrote:
>
> What happens if the file is renamed/deleted and replaced with a
> different file while it is open?
>
>
>>From the perspective of your process, nothing. If I open /tmp/foo,
and then someone else executes 'rm /tmp/foo'. I really don't
notice. I've still got the open file. It is probably true that no
other processes can now open the file, since they won't
see it in the filesystem, so whatever changes I make to
the file will be lost as soon as I close it. Of course, any
other processes that have opened the file before it was
removed will see changes.
If someone creates another file named with the name '/tmp/foo',
again, I won't notice. It's a different file with a different inode.
.
- Follow-Ups:
- Re: how to get the file name
- From: Måns Rullgård
- Re: how to get the file name
- References:
- how to get the file name
- From: marsarden
- Re: how to get the file name
- From: "Nils O. Selåsdal"
- Re: how to get the file name
- From: Tim Keck
- Re: how to get the file name
- From: "Nils O. Selåsdal"
- Re: how to get the file name
- From: Måns Rullgård
- how to get the file name
- Prev by Date: Re: evecv/memory leak
- Next by Date: Re: how to get the file name
- Previous by thread: Re: how to get the file name
- Next by thread: Re: how to get the file name
- Index(es):
Relevant Pages
|