OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: /tmp topic
From: Brad Cavanagh (bradSUCCESS-INFO.COM)
Date: Fri Dec 15 2000 - 18:19:58 CST


> Is there a standard or a guide or a "HOWTO" <g> on using tmp
> directories safely? About using mkstemp(), assigning correct
> permissions, erasing the file at program termination, etc.

Well, Tim Jenness wrote the File::Temp module for Perl which returns the
filehandle and filename together, which helps guarantee that a race condition
cannot occur between checking for the existence of the file and its opening.

http://search.cpan.org/search?dist=File-Temp

The readme has a small smattering of information on temporary file creation and
the like, so it could be of interest to some people.

---
Brad Cavanagh, Success Information Systems
phone: (250) 381-8811  fax: (250) 381-8815
web: http://www.success-info.com