21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

74 <strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong>or process. In these cases, gawk sets the built-in variable ERRNO to a string describing theproblem.In gawk, when closing a pipe or coprocess (input or output), the return value is theexit status of the command. 3 Otherwise, it is the return value from the system’s close orfclose C functions when closing input or output files, respectively. This value is zero ifthe close succeeds, or −1 if it fails.The POSIX standard is very vague; it says that close returns zero on success and nonzerootherwise. In general, different implementations vary in what they report when closingpipes; thus the return value cannot be used portably.3This is a full 16-bit value as returned by the wait system call.information on how to decode this value.See the system manual pages for

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!