makesure icon indicating copy to clipboard operation
makesure copied to clipboard

Add more safety by handling the return value of close()

Open xonixx opened this issue 4 years ago • 0 comments

See https://www.gnu.org/software/gawk/manual/html_node/Close-Files-And-Pipes.html#index-sidebar-10

$ awk --posix 'BEGIN { (s="echo 123; exit 10") | getline; print; print close(s) }'
123
0
$ awk 'BEGIN { (s="echo 123; exit 10") | getline; print; print close(s) }'
123
2560
$ busybox awk 'BEGIN { (s="echo 123; exit 10") | getline; print; print close(s) }'
123
2560
$ mawk 'BEGIN { (s="echo 123; exit 10") | getline; print; print close(s) }'
123
10

xonixx avatar Mar 22 '21 01:03 xonixx