On 03/29/2010 04:29 AM, James Youngman wrote: > +int > +open_cloexec (const char *path, int flags) > +{ > + int fd; > +
One more thing I just thought of: it would be wise to add: assert ((flags & O_CREAT) == 0); > + fd = open (path, flags > +#if defined O_CLOEXEC > + |O_CLOEXEC > +#endif > + ); so that you don't accidentally create a file without passing the mode argument here. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Findutils-patches mailing list Findutils-patches@gnu.org http://lists.gnu.org/mailman/listinfo/findutils-patches