Author: sebor
Date: Fri Mar 14 14:36:55 2008
New Revision: 637279
URL: http://svn.apache.org/viewvc?rev=637279&view=rev
Log:
2008-03-14 Martin Sebor <[EMAIL PROTECTED]>
* xcomp.awk: Closed pipelines to avoid exhausting OPEN_MAX limit.
Modified:
stdcxx/trunk/bin/xcomp.awk
Modified: stdcxx/trunk/bin/xcomp.awk
URL:
http://svn.apache.org/viewvc/stdcxx/trunk/bin/xcomp.awk?rev=637279&r1=637278&r2=637279&view=diff
==============================================================================
--- stdcxx/trunk/bin/xcomp.awk (original)
+++ stdcxx/trunk/bin/xcomp.awk Fri Mar 14 14:36:55 2008
@@ -149,7 +149,9 @@
"-" re_buildtype "-" "[1-9][0-9]*-log"
# get today's date
- "LC_ALL=C date" | getline todays_date
+ cmd = "LC_ALL=C date"
+ cmd | getline todays_date
+ close(cmd)
# set the conversion format to two decimal places
CONVFMT = "%.3g"
@@ -214,6 +216,7 @@
if (0 < index(pattern, "{")) {
cmd = "echo " pattern
cmd | getline pattern
+ close(cmd)
}
# split the (potentially expanded) pattern into an array
@@ -1848,6 +1851,7 @@
duration = "~/stdcxx/bin/duration -f \"" logdates [fname] \
"\" \"" todays_date "\""
duration | getline fullage
+ close(duration)
pos = index(fullage, ", ")
buildage = substr(fullage, 1, pos - 1)
@@ -1873,6 +1877,8 @@
# format the size of the expanded log file
cmd = "du -k " fname
cmd | getline
+ close(cmd)
+
fullsize = $1
size = format_size(fullsize * 1024)