bug-gnu-utils
[Top][All Lists]
Advanced

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

GAWK: crash after multiple execution other program


From: Kenny McCormack
Subject: GAWK: crash after multiple execution other program
Date: 23 Apr 2002 09:08:13 -0500

In article <address@hidden>,
Timur Elzhov <address@hidden> wrote:
>Hello!
>
>I tried to run this script:
>
>----------------------------
>
>#!/usr/bin/gawk -f
>BEGIN {
>
>    N = 10000;
>
>    for (i = 0; i < N; i++) {
>        ("echo "i) | getline;
>        print $0;
>    }
>}

The short answer is that you need to close the pipe each time through or
else you may run into any number of resource limits (e.g., number of
processes and/or number of open files).

My understanding had been that in all versions of AWK other than GAWK,
there was a hard limit of 10 open files and that you had to manage things
yourself in order to avoid exceeding this limit.  So, I'm surprised that
MAWK got past this limit, but I can assume that in GAWK, you were hitting
the limit of # of processes, not # of open files.



reply via email to

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