So if it is cross-platform, then what's the problem?<br><br><div class="gmail_quote">On Thu, Aug 18, 2011 at 11:35 AM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Thu, 18 Aug 2011 07:54:32 +0200<br>
<div class="im">David Townshend <<a href="mailto:aquavitae69@gmail.com">aquavitae69@gmail.com</a>><br>
wrote:<br>
><br>
</div><div class="im">> The only problem is that O_EXCL may not be supported on all platforms.  Can<br>
> anyone tell me which platforms these are?<br>
<br>
</div>That sounds unlikely. O_EXCL is a POSIX standard. It is also supported<br>
under Windows by the _open/_wopen compatibility functions (which we use<br>
for file I/O).<br>
<br>
Probably there are very old systems which don't support it, and perhaps<br>
new systems that don't implement it *correctly* (meaning not<br>
atomically); for the former I'd say we just don't care (who's gonna run<br>
Python 3 on a 1995 system?) and for the latter, well, if the OS<br>
designers think it's fine, let's just expose it as it is.<br>
<br>
As for NFS, there's an interesting comment from 2007 here:<br>
<a href="http://lwn.net/Articles/251971/" target="_blank">http://lwn.net/Articles/251971/</a><br>
<br>
“My NFS tester shows that it at least appears to work with Linux,<br>
Solaris and FreeBSD:<br>
<a href="http://www.dovecot.org/list/dovecot/2007-July/024102.html" target="_blank">http://www.dovecot.org/list/dovecot/2007-July/024102.html</a>. Looking at<br>
Linux 2.6 sources it doesn't look like it tries to implement a racy<br>
O_EXCL check in client side (fs/nfs/nfs3proc.c nfs3_proc_create()), so<br>
the test's results should be correct. I don't know if other OSes do<br>
that. I guess it would be nice to have a better O_EXCL tester which<br>
tries to catch race conditions.”<br>
<br>
Regards<br>
<font color="#888888"><br>
Antoine.<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</div></div></blockquote></div><br>