Please make sure this doesn't have race conditions when using /tmp or TMPDIR. Maybe use O_EXCL (with open(2)) when creating, but that may not be good enough for some network-based filesystems. And don't use 666 for creating the file. If I overlooked or misunderstood something, please let us know. Jeremy C. Reed technical support & remote administration http://www.pugetsoundtechnology.com/