[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
another gawk 3.1.2 bug
From: |
John H. DuBois III |
Subject: |
another gawk 3.1.2 bug |
Date: |
Wed, 16 Apr 2003 00:30:23 -0700 |
User-agent: |
Mutt/1.3.28i |
Under SCO OpenServer 5.0.6a and linux, this program:
BEGIN{cmd = "cat /etc/termcap"; cmd | getline; print close(cmd); }
(where /etc/termcap is any file large enough that it will not fit in pipe
buffers)
correctly prints 141 (process killed by SIGPIPE) under gawk 3.1.1.
Under gawk 3.1.2 (built with gcc 2.95.3 & 3.2.2), it prints 13; the high bit
(indicating that the process exited due to receipt of a signal) is being lost.
Some further problems with the return value from close:
$ gawk-3.1.2 'BEGIN{cmd = "exit 1"; cmd | getline; print close(cmd); }'
256
$ gawk-3.1.2 'BEGIN{cmd = "exit 2"; cmd | getline; print close(cmd); }'
512
John
--
John DuBois address@hidden KC6QKZ/AE http://www.armory.com/~spcecdt/
- another gawk 3.1.2 bug,
John H. DuBois III <=