You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an AWK program reads from a file or process, AWK keeps the
connection to the file or process open until the program explicitly
closes it. This is useful in order to read multiple lines from a file,
or to keep reading input from a long-running coprocess, but it also
means that we must make sure to close any short helper program we
launch, otherwise we will leak one file descriptor (the pipe to the
child process) per invocation and eventually run out of file descriptors
(EMFILE Too many open files). (See also the time() function for an
example where we already do this.)
Fixesdspinellis#9.
I am running
pmonitor -i1
on a long-runningcp
process that copies some large files but also very many small files, and I’m getting this error:I think
file_length
is leaking file descriptors (though I’m not quite sure about the details).PR incoming.
The text was updated successfully, but these errors were encountered: