> The only argument against it, that I'm aware of, is that 
> system() is ANSI, while execve() is POSIX: i.e. 
> portability... does windows have execve()? That could be done 
> the way the current preprocessor conditionals yield rmdir 
> instead of rm.

Windows does have execve(), though it's named _execve(). Not sure if
that means it has slightly different behaviour than on Unix. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/h
tml/_crt__execve.2c_._wexecve.asp.

But looking at the code you will notice that win32 already does not use
system() - copydir() is available to do it internally. Haven't looked at
the details, but perhaps this can just be used straight off on Unix as
well.

From what I can tell, rm is also handled in the rmtree() function, and
not by system(), since version 1.138 of dbcommands.c.

//Magnus


Mon, 20 Sep 2004 09:54:23 +0200
"Magnus Hagander" <mha@sollentuna.net>
Re: execve() vs system() for chrooted filesystems in dbcommands.c