bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: READ_TIMEOUT problem


From: Andres MERE
Subject: Re: READ_TIMEOUT problem
Date: Fri, 17 Apr 2020 11:41:12 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Halloo,


My GAWK is 4.1.4 (Ubuntu 18.04). Newest GAWK (5.1) behaves the same way.

Yes, it is waiting for the socket open. I do understand it now (I had to think twice).

I really must take a look at the gawkextlib select library.


Many thanks,
Andres

On 16.04.2020 21:56, address@hidden wrote:
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]