guix-commits
[Top][All Lists]
Advanced

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

14/16: list-runtime-roots: Bufferize the lsof pipe.


From: Ludovic Courtès
Subject: 14/16: list-runtime-roots: Bufferize the lsof pipe.
Date: Wed, 8 Mar 2017 17:44:35 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit ac9c1dc7bdf1a016fcd1989993999e4a32d0c885
Author: Ludovic Courtès <address@hidden>
Date:   Wed Mar 8 23:10:09 2017 +0100

    list-runtime-roots: Bufferize the lsof pipe.
    
    * nix/scripts/list-runtime-roots.in (lsof-roots): Add 'setvbuf' call for
    PIPE.
---
 nix/scripts/list-runtime-roots.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/nix/scripts/list-runtime-roots.in 
b/nix/scripts/list-runtime-roots.in
index 993eb16..a693808 100644
--- a/nix/scripts/list-runtime-roots.in
+++ b/nix/scripts/list-runtime-roots.in
@@ -1,7 +1,7 @@
 address@hidden@ -ds
 !#
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2017 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -133,6 +133,9 @@ or the empty list."
         (define %file-rx
           (make-regexp "^n/(.*)$"))
 
+        ;; We're going to read it all.
+        (setvbuf pipe _IOFBF 16384)
+
         (let loop ((line  (read-line pipe))
                    (roots '()))
           (cond ((eof-object? line)



reply via email to

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