Bug#290507: vim does not close file upon :sh

Bram Moolenaar Bram at Moolenaar.net
Sun Aug 16 20:12:32 UTC 2009


James -

> > > > This page mentions that one should get the flags first:
> > > > http://www.cs.ui.ac.id/WebKuliah/IKI10100/resources/contest/OnlineJudge/gnudoc/libc/Descriptor_Flags.html
> > > 
> > > Ah, yes.  Currently FD_CLOEXEC is the only supported flag, but that
> > > would be the proper way to do this for long-term robustness.  Should I
> > > update this part of the patch or will you take care of it with the
> > > autoconf checks?
> > 
> > I would appreciate it if you can update the patch as far as you can and
> > test it.  Then I'll have a look at it as well.  It's always better to
> > have more than one person look at these things to avoid mistakes.
> 
> Updated patch attached.  The flags are retrieved first and F_SETFD is
> only called if that was successful and FD_CLOEXEC isn't already set.
> I've also added an autoconf check which defines HAVE_FD_CLOEXEC if it is
> successful.  That is also used to guard the related code instead of the
> previous "#ifdef UNIX".
> 
> I followed the model of similar autoconf checks for the FD_CLOEXEC
> check.  I think it should be sufficient but I don't have any systems
> which have fcntl.h yet don't define FD_CLOEXEC.

Thanks, I'll look into it when I'm back from a trip.

- Bram

-- 
hundred-and-one symptoms of being an internet addict:
167. You have more than 200 websites bookmarked.

 /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///





More information about the pkg-vim-maintainers mailing list