Oh, right. execve replaces the existing process with the invoked one, so I'm not sure that use case makes sense. Usually execve is used with fork, too.
If you're concerned with Windows portability, mmap(2) is a bigger problem. Otherwise, not sure why you're asking...?
Sometimes I don't want to fork, e.g., if there's nothing waiting for input, e.g., the last program in a pipe.
prog |prog |exec prog
The usual way to do this is to put it in a shell script, then run the shell script. Though it would be nice in some instances, you can't run exec from a shell prompt or you'll exit the shell. I was thinking that if I'm in the kona console, executed from a parent shell, then I could type exec from the console and run programs without forking, because it's not going to cause kona to exit. Wishful thinking.
To stop forking, you would have to add an option to call execve() instead of system() in the kona source.