all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob f5283a6b21d5e7e848f4ad9e116f34ee06bb1f16 1071 bytes (raw)
name: gnu/packages/patches/coreutils-skip-nohup.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
commit 5dce6bdfafc930dfd17d5d16aea7d1add3472066
Author: Pádraig Brady <P@draigBrady.com>
Date:   Wed Mar 5 15:14:07 2014 +0000

    tests: fix false failure in nohup.sh in non tty builds
    
    * tests/misc/nohup.sh: When running tests without a controlling tty,
    an exec failure is triggered in a subshell, which causes POSIX
    shells to immediately exit the subshell.  This was brought
    to notice by the newly conforming bash 4.3.
    Fixes http:/bugs.gnu.org/16940

diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh
index 6d2b515..2328b43 100755
--- a/tests/misc/nohup.sh
+++ b/tests/misc/nohup.sh
@@ -63,6 +63,11 @@ rm -f nohup.out err
 # to stderr must be fatal.  Requires stdout to be terminal.
 if test -w /dev/full && test -c /dev/full; then
 (
+  # POSIX shells immediately exit the subshell on exec error.
+  # So check we can write to /dev/tty before the exec, which
+  # isn't possible if we've no controlling tty for example.
+  test -c /dev/tty && >/dev/tty || exit 0
+
   exec >/dev/tty
   test -t 1 || exit 0
   nohup echo hi 2> /dev/full

debug log:

solving f5283a6 ...
found f5283a6 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.