[patch] KFax

Ryan Cumming ryan at kde.org
Mon Nov 18 10:06:19 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On November 18, 2002 01:34, Guillaume Laurent wrote:
> On Monday 18 November 2002 10:24, Per Winkvist wrote:
> > On November 18, 2002 10:15, Ryan Comming wrote:
> > > On November 18, 2002 01:06, Per Winkvist wrote:
> > > >         hTiff = TIFFOpen( file, "r" );
> > > >         unlink( file );
> > > >         do things with hTiff
> > >
> > > And what's the problem with this, exactly?
> >
> > Why would you want to remove the file before you close its handle?
>
> Guess : So the file is automagically deleted when the program which has
> opened it terminates, even if it crashes (the OS ensures it will be
> deleted). This is a classic way of avoiding stray temp files.

More specifically, the file's disk space is freed as soon as its last handle 
is closed. But yes, it's a good idea to unlink temporary files as early as 
possible, if they're no longer needed in the filesystem namespace.

- -Ryan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE92LujLGMzRzbJfbQRAhXIAJ9TVTCZIxwCL2exXIRnq3vDtwHMzACcCHuL
NoktsKRBKlMLKpXCVCB3aig=
=M3YH
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list