Re: figuring out a filename from it's handle...
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Thu, 30 Aug 2007 22:28:58 -0000
On Aug 30, 11:53 pm, daneyu...@xxxxxxxxx wrote:
If I've lost track of a filename that a channel was opened for, is
there a way to get the filename from just the channel name?
In other words, after doing the following:
set file_handle [open $filename r]
can I then use $file_handle to determine $filename?
If you're at the design step, just keep the association at script
level.
If you want to debug a large and barely modifiable script, on Linux
you can do some I/O on the channel under strace, find the underlying
file descriptor, and then look for the same descriptor in /proc/[pid]/
fd. These are pseudo-symbolic links giving the path of the files (or
pipe or socket IDs).
-Alex
.
- Follow-Ups:
- Re: figuring out a filename from it's handle...
- From: Cameron Laird
- Re: figuring out a filename from it's handle...
- References:
- figuring out a filename from it's handle...
- From: daneyuleb
- figuring out a filename from it's handle...
- Prev by Date: Finding which package loaded
- Next by Date: Re: Finding which package loaded
- Previous by thread: figuring out a filename from it's handle...
- Next by thread: Re: figuring out a filename from it's handle...
- Index(es):
Relevant Pages
|