the presence of the empty string argument.
[bug introduced in coreutils-8.0]
+ sort is now immune to the signal handling of its parent.
+ Specifically sort now doesn't exit with an error message
+ if it uses helper processes for compression and its parent
+ ignores CHLD signals. [bug introduced in coreutils-6.9]
+
timeout is now immune to the signal handling of its parent.
Specifically timeout now doesn't exit with an error message
if its parent ignores CHLD signals. [bug introduced in coreutils-7.6]
}
#endif
}
+ signal (SIGCHLD, SIG_DFL); /* Don't inherit CHLD handling from parent. */
/* The signal mask is known, so it is safe to invoke exit_cleanup. */
atexit (exit_cleanup);
# Ensure that $TMPDIR is valid.
TMPDIR=.; export TMPDIR
-
# This should force the use of temp files
sort -S 1k in > out || fail=1
compare exp out || fail=1
chmod +x gzip
+# Ensure `sort` is immune to parent's SIGCHLD handler
+# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
+(
+ # ash doesn't support "trap '' CHLD"; it knows only signal numbers.
+ sig=`"$abs_top_builddir/src/kill" -l CHLD 2>/dev/null` && trap '' $sig
+
+ # This should force the use of child processes for "compression"
+ PATH=.:$PATH exec sort -S 1k --compress-program=gzip in > /dev/null
+) || fail=1
+
# This will find our new gzip in PATH
PATH=.:$PATH sort -S 1k --compress-program=gzip in > out || fail=1
compare exp out || fail=1