diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-03-08 23:10:09 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-03-08 23:42:53 +0100 |
commit | ac9c1dc7bdf1a016fcd1989993999e4a32d0c885 (patch) | |
tree | 938ea523926842e0f469d5fa23f98724945809da /nix/scripts | |
parent | 1062063a65036f32a061c54866d33ffe079ec44e (diff) | |
download | guix-ac9c1dc7bdf1a016fcd1989993999e4a32d0c885.tar.gz |
list-runtime-roots: Bufferize the lsof pipe.
* nix/scripts/list-runtime-roots.in (lsof-roots): Add 'setvbuf' call for PIPE.
Diffstat (limited to 'nix/scripts')
-rw-r--r-- | nix/scripts/list-runtime-roots.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nix/scripts/list-runtime-roots.in b/nix/scripts/list-runtime-roots.in index 993eb169c1..a6938087b5 100644 --- a/nix/scripts/list-runtime-roots.in +++ b/nix/scripts/list-runtime-roots.in @@ -1,7 +1,7 @@ #!@GUILE@ -ds !# ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2017 Ludovic Courtès <ludo@gnu.org> ;;; ;;; 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) |