[cap-talk] CapC? (was: execve() and CLOEXEC)

Jonathan S. Shapiro shap at eros-os.com
Sat Nov 24 13:15:32 EST 2007


On Sat, 2007-11-24 at 16:58 +0000, David Hopwood wrote:

> Another problem with the Python implementation is that it is silently
> unsafe if close() fails for a given fd. (According to
> <http://www.opengroup.org/onlinepubs/000095399/functions/close.html>,
> close() may fail if it is interrupted by a signal, or an I/O error
> occurred. In either of these cases, the safe variant of execve should
> also fail rather than ignoring the error.)

Nit: it should simply re-try the close when that makes sense (e.g. the
signal case).



More information about the cap-talk mailing list