On Mon, 2005-06-20 at 13:24 +0200, Dirk Meyer wrote:
> Is there a reason why you didn't use mkstemp?

Well, you can't use mkstemp to create a shared memory object, so I
needed code to create a suitably random filename anyway.  For the
filesystem fallback, I already had the random name, and didn't really
need to use mkstemp.  I open the files with O_EXCL, which is all the
mkstemp does as well.

The only benefit I think we get over mkstemp is that it first checks for
the existence of the random name, and if it exists, it tries again until
it finds one that doesn't exist.  But in practice, the probability of
this happening is low, unless it's under attack, in which case it will
just fail and raise an IOError in python space.

Jason.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to