do the unlink before the close or immediately after open. Your process keeps the file handle, can read/write, seek etc... but no-one else can open it. On close, the file will disappear as the last link to it will be removed it will land on the free block list.
On Mon, Jul 19, 2010 at 9:39 PM, Leslie S Satenstein <[email protected]>wrote: > Background > > When I was an IBMer, and using the VM machine, back in 1970, we had a file > type that was called scratch, or temp. > This file type had the property that one could open it, write, rewind, or > even seek to a position. But the one quality it had was that on a close, > the file was purged. That is, the close of this file did a unlink without > having to first do a fclose() followed by the unlink(). > > Now the question > > What if any similar function is available in Linux? How can I insure that > the fclose() immediately followed by the unlink(), on the same hardware > system, is not interruptable? > > Oh yes, as I remember, one could not share a temp file. These temp files > were often used for sort-work areas or compiler work-areas. > > > > > > *------------------ > > * > > Regards > * > Leslie > * > *Mr. Leslie Satenstein > * > > mailto:[email protected] <[email protected]> > mailto [email protected] > www.itbms.biz > > _______________________________________________ > mlug mailing list > [email protected] > https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca > >
_______________________________________________ mlug mailing list [email protected] https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca
