diff options
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index dc9087ba..7c346a3a 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -33856,6 +33856,14 @@ A pipe opened for input. @item |& A two-way coprocess. @end table +On error, a @code{false} value is returned. Otherwise, the return status +is @code{true}, and additional information about the redirection is +returned in the @code{ibufp} and @code{obufp} pointers. For input redirections, +the @code{*ibufp} value should be non-NULL, and @code{*obufp} should be NULL. +For output redirections, +the @code{*obufp} value should be non-NULL, and @code{*ibufp} should be NULL. +For two-way coprocesses, both values should be non-NULL. In the usual case, +the extension is interested in @code{(*ibufp)->fd} and/or @code{fileno((*obufp)->fp)}. If the file is not already open, and the fd argument is non-negative, @command{gawk} will use that file descriptor instead of opening the file in the usual way. If the fd is non-negative, but the file exists @@ -33869,8 +33877,8 @@ Note that in the two-way case, the input and output file descriptors may differ. To check for success, one must check whether either matches. @end table -For example, this API function can be used to implement I/O multiplexing or a -socket library. +It is anticipated that this API function will be used to implement I/O +multiplexing and a socket library. @node Extension API Variables @subsection API Variables |