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

Re: PATCH: functions with redirections



On Sep 29,  1:53pm, Bart Schaefer wrote:
}
} foo() { echo foo; } >&3
} foo 3>&2

Tried this now; happily it works the same as bash.

} > If anyone wants something else to do they can think about whether I've
} > introduced any subtle memory leaks.
} 
} I wouldn't expect any that would fool valgrind on a few simple examples.

I tried a function with an output descriptor redirection and an input
here-document and valgrind found no leaks.

Tangential remark:  function-definition  redirections to files may
produce unexpected errors when noclobber is set.



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