/dev/stdXXX symlinks in RH 3.0.3 and gawk-3.0.0

Alessandro Suardi (asuardi@uninetcom.it)
Mon, 04 Nov 1996 02:16:51 +0100


Building gawk 3.0.0 I ran make check but it failed on one test.
Snooping the test I saw that a line that should have gone on
stdout actually didn't. Well, "stdout" for gawk's tests is
/dev/stdout... so here is the problem:

[redrose]/usr/new/gawk-3.0.0/test[87]# ls -l /dev/std*
lrwxrwxrwx 1 root root 17 Jun 16 22:55 /dev/stderr ->
../proc/se
lf/fd/2
lrwxrwxrwx 1 root root 17 Jun 16 22:55 /dev/stdin ->
../proc/sel
f/fd/1
lrwxrwxrwx 1 root root 17 Jun 16 22:55 /dev/stdout ->
../proc/se
lf/fd/0

I have RedHat 3.0.3, unless I have messed things up with
iBCS MAKEDEV I never touched those symlinks, where it is
clear that stdin and out are reversed.

The sad thing is that reversing links does not yield anything
different (EOF on the out2 file). Tried with both bash and
tcsh. Three questions:

0. Am I just late (there is a 3.0.1 gawk or so) ? If not...
1. Am I correct in exchanging /dev/stdout with /dev/stdin so
that stdout=/proc/self/1 and stdin=/proc/self/0 ? And,
2. Is the test broken ?

thanks in advance,

--alessandro

Linux kernel-2.1.7 libc-5.4.10 gcc-2.7.2 binutils-2.7.0.3