On Thu, 2009-08-20 at 01:08 -0400, Gang Shu wrote: > “there is a (possibly brief) period of time between the return of the > open() call or other function creating a file descriptor and the > fcntl() call to set the flag", so we believe that an object is changed > to rely on FD_CLOEXEC for closure after exec, the corresponding child > cleanup should to be changed since it will otherwise also try to > close() the fd for a second time.
Yeah, this may be a problem. If the same file descriptor is opened after the exec() call closes it, we may close someone else's open descriptor. -- Bojan
