Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Logging to a filehandle of a deleted file

by idsfa (Vicar)
on Feb 28, 2007 at 14:30 UTC ( #602507=note: print w/ replies, xml ) Need Help??


in reply to Logging to a filehandle of a deleted file

cf Re: (OT) place on linux box to safely create tons of temp junk???

As that node indicates, one solution to retain your information is to rewind your file handle. This works so long as all that you want is for that information to be available to the process which already has the handle.

On some OSes with /proc file systems, the OS exposes the file handles. In linux, for example, if my PID is 54321, file handle #4 can be found at /proc/54321/fd/4. This "file" can be copied back into the regular filesystem, read by other applications (so long as you have the correct permissions), etc.


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon


Comment on Re: Logging to a filehandle of a deleted file
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602507]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2014-10-21 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (103 votes), past polls