From 54664b6fb74e964d70530d13e25459751d0c63fb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 16 Jul 2003 21:24:02 +0000 Subject: * The write() system call can write less than the requested number of bytes, e.g., in case of a signal like SIGSTOP. This caused `nix --dump' to fail sometimes. Note that this bug went unnoticed because the call to `nix --dump' is in a pipeline, and the shell ignores non-zero exit codes from all but the last element in the pipeline. Is there any way to check the result of the initial elements in the pipeline? (In other words, is it at all possible to write reliable shell scripts?) --- corepkgs/nar/nar.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'corepkgs/nar') diff --git a/corepkgs/nar/nar.sh b/corepkgs/nar/nar.sh index 059bca8ba1..a7b6be8aaa 100644 --- a/corepkgs/nar/nar.sh +++ b/corepkgs/nar/nar.sh @@ -1,3 +1,5 @@ #! /bin/sh +echo "packing $path into $out..." /nix/bin/nix --dump --file "$path" | bzip2 > $out || exit 1 + -- cgit 1.4.1