> Which behavior do you prefer? To have fexecve close the fd > automatically or to leave it up to the caller? It seems less magical > to leave it to the caller, but it also requires action from the > caller.
For designed-for-NetBSD code, callers already need changing to use fexecve at all, so I don't see that as a big deal. If I've read what you wrote right, that's what other implementations do, so designed-for-elsewhere code probably expects that. And, for what little it may be worth, my preference would be that fexecve act like execve in this respect. So, all of those point in the same direction: close it iff CLOEXEC is set on it. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
