Groups | Search | Server Info | Login | Register


Groups > comp.lang.awk > #147

Re: getline timeout (revisited)

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!news2.arglkargh.de!news.tornevall.net!.POSTED!not-for-mail
From arnold@skeeve.com (Aharon Robbins)
Newsgroups comp.lang.awk
Subject Re: getline timeout (revisited)
Date Sun, 10 Apr 2011 18:49:35 +0000 (UTC)
Organization TornevallNET - http://news.tornevall.net
Lines 28
Message-ID <insu3u$44j$2@tornado.tornevall.net> (permalink)
References <inmun6$lq1$1@speranza.aioe.org>
NNTP-Posting-Host 215670e92f34847843afdb0188913a6b
X-Trace 9d00535c08bbf06464d3e096636440db
X-Complaints-To abuse@tornevall.net
X-Complaints-Language Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE!
Originator arnold@skeeve.com (Aharon Robbins)
X-UserIDNumber 2223
X-Newsreader trn 4.0-test76 (Apr 2, 2001)
X-Validate-Post http://news.tornevall.net/validate.php?trace=9d00535c08bbf06464d3e096636440db
X-Complaints-Italiano Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie
X-Posting-User 917a3762e63ffa4d3c84c030d90adc98
Xref x330-a1.tempe.blueboxinc.net comp.lang.awk:147

Show key headers only | View raw


In article <inmun6$lq1$1@speranza.aioe.org>,
Janis Papanagnou  <janis_papanagnou@hotmail.com> wrote:
>I've been currently looking for a timeout option for getline in
>the context of an /inet/tcp/... socket communication with gawk.

The current versions of gawk have two environment variables that
affect this.  From the development gawk man page:

For socket communication, two special environment variables
can be used to control the number of retries
.RB ( GAWK_SOCK_RETRIES ),
and the interval between retries
.RB ( GAWK_MSEC_SLEEP ).
The interval is in milliseconds. On systems that do not support
.IR usleep (3),
the value is rounded up to an integral number of seconds.

The code is in io.c; look for getenv.  These are probably not documented
in 3.1.8.

HTH,

Arnold
-- 
Aharon (Arnold) Robbins 			arnold AT skeeve DOT com
P.O. Box 354		Home Phone: +972  8 979-0381
Nof Ayalon		Cell Phone: +972 50  729-7545
D.N. Shimshon 99785	ISRAEL

Back to comp.lang.awk | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

getline timeout (revisited) Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-04-08 14:23 +0200
  Re: getline timeout (revisited) arnold@skeeve.com (Aharon Robbins) - 2011-04-10 18:49 +0000
  Re: getline timeout (revisited) j.eh@mchsi.com - 2011-04-19 09:09 -0500
    Re: getline timeout (revisited) Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-04-19 17:38 +0200
      Re: getline timeout (revisited) j.eh@mchsi.com - 2011-04-20 06:51 -0500
        Re: getline timeout (revisited) Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-04-20 14:20 +0200
          Re: getline timeout (revisited) j.eh@mchsi.com - 2011-04-20 08:21 -0500
            Re: getline timeout (revisited) j.eh@mchsi.com - 2011-04-21 05:46 -0500
            Re: getline timeout (revisited) arnold@skeeve.com (Aharon Robbins) - 2011-04-22 13:55 +0000
              Re: getline timeout (revisited) Grant <omg@grrr.id.au> - 2011-04-23 06:50 +1000

csiph-web