<br><br><div class="gmail_quote">On 13 August 2012 23:49, Richard O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz" target="_blank">ok@cs.otago.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On 13/08/2012, at 11:26 PM, Alexander Kjeldaas wrote:<br>
<br>
><br>
> This isn't that hard - a pipe shouldn't be needed anymore. Just require a post-2003 glibc.<br>
><br>
> fexecve is a system call in most BSDs. It is also implemented in glibc using a /proc hack.<br>
<br>
</div>fexecve is now in the Single Unix Specification, based on<br>
POSIX as of 2008, I believe. However,<br>
<a href="http://www.gnu.org/software/gnulib/manual/html_node/fexecve.html" target="_blank">http://www.gnu.org/software/gnulib/manual/html_node/fexecve.html</a><br>
says<br>
Portability problems not fixed by Gnulib:<br>
* This function is missing on many non-glibc platforms: MacOS X 10.5, FreeBSD 6.0,<br>
NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1,<br>
Solaris 11 2010-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.<br>
<br>
That warning doesn't seem to be fully up to date. I'm using MacOS X 10.6.8<br>
and fexecve() isn't in the manuals or in <unistd.h>.<br>
<br></blockquote><div><br></div><div>FreeBSD 8.0 is covered.</div><div>OpenBSD not covered</div><div>OS X not covered</div><div><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/execve.2.html">http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/execve.2.html</a></div>
<div>Solaris probably not covered.</div><div><br></div><div>So support is pretty good, I'd say. For non-modern systems, checking the existence of the file first is possible. The race isn't important, and one can always upgrade to a modern operating system.</div>
<div><br></div><div>Alexander</div></div>