guix-commits
[Top][All Lists]
Advanced

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

03/05: gnu: js-mathjax: Avoid "Too many open files" error while building


From: guix-commits
Subject: 03/05: gnu: js-mathjax: Avoid "Too many open files" error while building.
Date: Thu, 16 May 2019 12:59:12 -0400 (EDT)

civodul pushed a commit to branch version-1.0.1
in repository guix.

commit 9da2dd90e2e8db8cfb922eb0c064876c146070dd
Author: Ludovic Court├Ęs <address@hidden>
Date:   Thu May 16 17:06:18 2019 +0200

    gnu: js-mathjax: Avoid "Too many open files" error while building.
    
    * gnu/packages/javascript.scm (js-mathjax)[arguments]: Add call to
    'close-pipe'.  Previously builds would sometimes fail with EMFILE (this
    was non-deterministic as it depends on GC activity.)
---
 gnu/packages/javascript.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 8731a44..e7dcd79 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -117,7 +117,11 @@
                   (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
                     (call-with-output-file installed
                       (lambda (port)
-                        (dump-port minified port)))))
+                        (dump-port minified port)))
+
+                    (let ((exit (close-pipe minified)))
+                      (unless (zero? exit)
+                        (error "dear, uglify-js failed" exit)))))
                  (else
                   (install-file file (dirname installed))))))
             (find-files "."))



reply via email to

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