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

Re: exec {_Dbg_new_fd}<>&-



>>>>> Peter Stephenson <pws@xxxxxxx> writes:

> Certainly expected by me: "close" means completely close the file
> descriptor.

Are you saying that

  exec {fd}<&-
  exec {fd}>&-

do exactly the same thing?  Then does it make sense to have both?

> I think the only alternative (that would allow you to leave
> it open for one of reading or writing after opening it for both) would
> be to close it and reopen it, which is a larger side effect than I would
> expect.  I'm happy to hear alternative interpretations, of course.

I guess socket fds could support half close with shutdown()..

greg



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