Hi.
"Andres MERE" <address@hidden> wrote:
Halloo,I am trying to set up a (server) process listening incoming
connections (and doing something useful). Simple experiment like
gawk 'BEGIN { n = "/inet/tcp/8888/0/0"; PROCINFO[n, "READ_TIMEOUT"] = 1000; if ((n
|& getline) > 0) { print } }'
leads to a blocking read. Can anyone explain the reasons for this? Am
I misunderstanding something?
Best regards,
Andres
It looks to me like it's hanging in the socket open, waiting for
a connect. As soon as you do 'telnet localhost 8888' the connect
will complete and then the timeout kicks in.
In the future please:
1. Try to use text only mail, and not HTML going forward,
2. Specify the version of gawk (from gawk --version) and operating
system you're using.
- If Windows, what is the provenance of the gawk version?
Hope this helps,
Thanks,
Arnold