Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug with eval, proc-subst and pipes

Bart Schaefer wrote:
> Something doesn't look right about this patch, but I've only looked at the
> patch itself, not at the context (I'm away from my usual computers at the
> moment).  The #ifndef lines seem to put both a functional and a no-op
> version of closedumps() in the same not-FD_CLOEXEC context?  And if
> closedumps() was a no-op with FD_CLOEXEC before (?) then would it change
> anything to remove it at the point of call?

It's a no-op in the not-USE_MMAP case for dumps.  In that case there was
no file descriptor in the first place, so closedumps() wasn't needed.
It would have been more logical not to define it and mark its use as

#if defined(USE_MMAP) && !defined(FD_CLOEXEC)

but I had no reason to change the way the not-USE_MMAP case was
implemented, particularly since it's not the case that gets compiled on
my or most modern systems.

So it's a minor inconsistency with no effect.

Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/

Messages sorted by: Reverse Date, Date, Thread, Author