jlg@lanl.gov (Jim Giles) (02/05/91)
From article <1991Feb2.193322.24374@watdragon.waterloo.edu>, by ccplumb@rose.uwaterloo.ca (Colin Plumb): > [...] > Well, "undump" works in Unix to restart a core file, [...] Well, almost. As far as I can tell, all versions of UNIX will automatically unlink all files from a process when it terminates - even if the termination is abnormal and generated a core file. A common way to implement temporary files in UNIX is to open/create the file and immediately remove it. The file itself isn't removed until the _process_ unlinks it (either by doing a close or by exiting). This clever way of making sure your temp files are automatically deleted is one reason core files cannot be restarted - their temp files are gone. If this problem has been corrected in some version of UNIX, I'd like to hear of it. J. Giles
limes@ouroborous.Eng.Sun.COM (Greg Limes (Hacking in Night Mode)) (02/06/91)
In article <13626@lanl.gov>, jlg@lanl.gov (Jim Giles) writes: |> This clever way of making sure your temp files are automatically |> deleted is one reason core files cannot be restarted - their temp |> files are gone. |> If this problem has been corrected in some version of UNIX, I'd like |> to hear of it. |> J. Giles You mean, "If this feature has been removed", and yes, I want to know about it, too, so I can avoid that version. If you want your temp files to hang out until you go through a normal termination, DONT UNLINK THEM until you are done with them. The fact that you are able to continue to do I/O on a file that you have unlinked is an incredibly useful feature. If you aim a pistol at your foot and pull the trigger, you are likely to get a little blood on your shoes. But, for goodness sake, don't ask me to build pistols that refuse to point down just because you insist on handling them improperly. -- Greg Limes [limes@eng.sun.com] kernel hacker in night mode