summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-11tests: avoid hung processes due to gdb SIGCONT handlingPádraig Brady
* tests/tail-2/inotify-race.sh: Add a `wait` to ensure that we reap all background gdb and tail processes. That resulted in the test hanging intermittently and upon investigation was due to gdb intermittently failing to terminate the child process due to receiving a SIGCONT signal. Therefore we avoid using timeout(1) which sends that signal, and instead rely on tail's inbuilt --pid monitoring on a background sleep process. Given this new implementation, the VERY_EXPENSIVE guard was removed. Related issues with this test hanging were previously discussed at: https://lists.gnu.org/archive/html/bug-coreutils/2009-12/msg00025.html
2015-05-11tests: fix races in and standardize the tail testsPádraig Brady
* tests/tail-2/F-vs-missing.sh: Use standard "fastpoll" options (-s.1 --max-unchanged-stats=1) to speedup the non-inotify case. Add the non-inotify case to the test. `wait` on the background tail process to terminate which should avoid the need for the non standard `retry_delay_ cleanup ...` on NFS. * tests/tail-2/F-vs-rename.sh: Remove 'out' at the start of the loop, to avoid a race in checking its contents. Also ensure 'a' & 'b' files are present before the tail process starts. Use the standard "fastpoll" options as above. * tests/tail-2/f-vs-rename.sh: Likewise. * tests/tail-2/append-only.sh: Use more standard variable names. * tests/tail-2/flush-initial.sh: Use "fastpoll" options for non-inotify platforms. Also `wait` on the background tail to avoid stray processes and file cleanup issues on NFS. * tests/tail-2/inotify-hash-abuse.sh: Always run non-inotify case. Use "fastpoll" options. Use a more standard retry_delay_ instead of a hardcoded sleep loop. Add a `wait` on the background tail. * tests/tail-2/inotify-hash-abuse2.sh: Likewise. * tests/tail-2/inotify-rotate-resources.sh: Wait just on the specific tail $pid needed. * tests/tail-2/inotify-rotate.sh: Use "fastpoll" options. * tests/tail-2/pid.sh: Use standard variable names. Add a `wait` on the background tails. * tests/tail-2/pipe-f2.sh: Likewise. * tests/tail-2/tail-n0f.sh: Likewise. * tests/tail-2/retry.sh: Use "fastpoll" options. * tests/tail-2/symlink.sh: Likewise. * tests/tail-2/wait.sh: Likewise. Speedup by using sub second parameters to timeout(1). Improve the part ensuring that -F never follows a renamed file. * tests/tail-2/infloop-1.sh: Remove invalid test. tail(1) was not being passed the --pid=$yes_pid option, retry_delay_ wasn't used to avoid races, and yes could write huge files before being killed. * tests/local.mk: Remove the invalid test reference. * tests/tail-2/assert-2.sh: Rewrite using retry_delay_(). Since no longer hardcoding large delays, remove the VERY_EXPENSIVE tag. * tests/tail-2/assert.sh: Likewise.
2015-05-10build: rewrite is_ENOTSUP without an #if directivePaul Eggert
* src/system.h (is_ENOTSUP): Avoid in-function #if directive.
2015-05-09build: avoid a warning form gcc's new -Wlogical-opJim Meyering
Without this change, very recent gcc (e.g., version 6.0.0 20150509) would print the following when configured with --enable-gcc-warnings: src/copy.c:165:30: error: logical 'or' of equal expressions \ [-Werror=logical-op] && (errno == EOPNOTSUPP || errno == ENOTSUP || errno == ENOSYS)) ^ * src/system.h (is_ENOTSUP): New function. * src/copy.c (punch_hole): Use it. * src/ls.c (errno_unsupported, gobble_file): Use it.
2015-04-30doc: standardize messages about the '-' stdin FILEPádraig Brady
* src/system.h (emit_stdin_note): A new function, refactoring the usage note about the '-' FILE implying stdin. * src/base64.c (usage): Use the new function to emit the note in a standard location and with standard separation. * src/cat.c (usage): Likewise. * src/csplit.c (usage): Likewise. * src/cut.c (usage): Likewise. * src/expand.c (usage): Likewise. * src/fmt.c (usage): Likewise. * src/head.c (usage): Likewise. * src/md5sum.c (usage): Likewise. * src/nl.c (usage): Likewise. * src/od.c (usage): Likewise. * src/paste.c (usage): Likewise. * src/pr.c (usage): Likewise. * src/ptx.c (usage): Likewise. * src/shred.c (usage): Likewise. * src/shuf.c (usage): Likewise. * src/sort.c (usage): Likewise. * src/sum.c (usage): Likewise. * src/tac.c (usage): Likewise. * src/tail.c (usage): Likewise. * src/tsort.c (usage): Likewise. * src/unexpand.c (usage): Likewise. * src/wc.c (usage): Likewise. * src/join.c (usage): Adjust the separation used for the message referring to FILE1 or FILE2 as stdin. * src/comm.c (usage): Add a message using the same wording (translation) as used in join. * src/split.c (usage): Reword to using FILE rather than INPUT, allowing use of emit_stdin_note(). Also remove the mention of "fixed-size" pieces as this isn't now always the case. Fixes http://pad.lv/1450179
2015-04-30tests: don't skip df tests with /proc/self/mountinfoPádraig Brady
* tests/df/no-mtab-status.sh: getmntent is no longer called when /proc/self/mountinfo is present, thus causing the test to be skipped. Therefore wrap fopen() to ignore mountinfo, and use the test genmntent table instead. * tests/df/skip-duplicates.sh: Likewise.
2015-04-28build: fix SINGLE_BINARY build when printf is a macroYunlian Jiang
* src/coreutils.c (usage): include coreutils.h outside the printf call, because if it's a macro you will get the error: embedding a #include directive within macro arguments is not supported
2015-04-28maint: avoid a new -Werror=return-type warning in yes.cPádraig Brady
* src/yes.c (main): Simplify the logic so that the compiler can see this function always returns a value. This was seen with GCC 5.0 in SINGLE_BINARY mode.
2015-04-28tests: run ls capability coloring test irrespective of $LS_COLORSPádraig Brady
* tests/ls/no-cap.sh: Ensure the test isn't skipped even if capability coloring is disabled in the current $LS_COLORS. Also just enable/disable capability coloring to avoid the dircolors(1) overhead.
2015-04-27maint: use gnulib styling with the online manualPádraig Brady
The equivalent styling added in v8.23-155-g3b98ee7, is now applied to gnulib using projects by default.
2015-04-27build: rely on gnulib to determine printf routines are safePádraig Brady
gnulib now only checks that the printf routines never crash, which is all coreutils currrently requires, and so we revert commit v8.23-81-gf57bfbb to let gnulib decide whether to replace the system printf routines.
2015-04-27maint: fix printf format for signed integersPádraig Brady
With GCC 5 and the newly added warnings from gnulib, ensure the correct signed integer is passed for the printf format, to avoid -Werror=format= failures.
2015-04-27build: update gnulib submodule to latestPádraig Brady
Fix file-has-acl build failure on RHEL/Centos 6. Fix GCC 5 warnings with printf and in fts.c.
2015-04-27build: reduce gettext dependency to 0.19.2Pádraig Brady
* bootstrap.conf: 0.19.2 is available on openSUSE-13.2, Debian-8.0, and Ubuntu-14.10. Given there were issues with earlier 0.19 gettext releases, set this as the new minimum. * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise. Reported by Bernhard Voelker
2015-04-26ls: on GNU/Linux, remove dependency on libaclPaul Eggert
* src/local.mk (src_ls_LDADD): Change from LIB_ACL to LIB_HAS_ACL.
2015-04-26build: update gnulib submodule to latestPaul Eggert
* bootstrap.conf (gnulib_modules): Add file-has-acl. (buildreq): Bump autopoint and gettext to 0.19.4. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.4. * gl/lib/tempname.c.diff, gl/lib/tempname.h.diff: Merge recent gnulib changes.
2015-04-23doc: fix grammar issue in truncate infoMichael Witten
* doc/coreutils.texi (truncate invocation): The word 'their' is incorrect; 'each file' is the antecedent, and is singular, so 'its' is the correct pronoun.
2015-04-22build: fix potential factor build failure on arm and mipsPádraig Brady
* src/longlong.h: Sync with the latest longlong.h from libgmp to: - Use __builtin_c[lt]zl on arm64. - Fix sparc64 vis3 build failure due to missing __clz_tab. - Avoid a clang build issue on mips. - Support thumb2 arm 32 bit system. * src/cfg.mk (sc_ensure_comma_after_id_est): Exclude longlong.h to ease merges.
2015-04-22maint: avoid -Werror=strict-overflow warnings with GCC 5Pádraig Brady
All warnings were of the form: "assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]" * src/dd.c (cache_round): Use an appropriately sized unsigned type, to avoid possibility of undefined signed overflow. * src/mknod.c (main): Likewise. * src/pr.c (pad_down): Likewise. * src/wc.c (main): Likewise. * src/tail.c (main): Assert that argc >= 0 thus allowing the compiler to assume without implication that argc - optind is positive.
2015-04-17dircolors: add 'MISSING' to the default databasePádraig Brady
* src/dircolors.hin: Add the MISSING entry, to indicate this as a possibility in new templates output from dircolors, and also to ease comparison with existing databases that generally do define a MISSING entry.
2015-04-13doc: clarify how cp behaves with default ACLsAndreas Gruenbacher
* doc/coreutils.texi (cp invocation): Mention that when copying files without preserving permissions, the umask or a default ACL affect the mode of new files. * THANKS.in: Remove committer. Related to http://bugs.gnu.org/8527
2015-04-13df: fix --local hanging with inaccessible remote mountsPádraig Brady
* src/df.c (filter_mount_list): With -l, avoid stating remote mounts. * init.cfg: Avoid test hangs with inaccessible remote mounts. * tests/df/no-mtab-status.sh: Skip with inaccessible remote mounts. * tests/df/skip-rootfs.sh: Likewise. * tests/df/total-verify.sh: Likewise. * NEWS: Mention the bug fix. Reported at http://bugzilla.redhat.com/1199679
2015-04-09doc: correct pluralization for mkfifo and mknodMitchel Humpherys
* doc/coreutils.texi: `mkfifo' and `mknod' use the optContext macro which adds a description for the SELinux security context in addition to the single option already described in each case. The result in both cases is two options being introduced as `option' (singular). Fix this by introducing them as `options' (plural).
2015-04-03df: fix use of uninitialized variable reported by valgrindPádraig Brady
Conditional jump or move depends on uninitialised value(s) at 0x40380C: get_field_values (df.c:840) by 0x403E16: get_dev (df.c:994) by 0x404D65: get_all_entries (df.c:1364) by 0x405926: main (df.c:1714) * src/df.c (get_dev): Initialize the fsu.fsu_bavail_top_bit_set member, when adding placeholder entries. (main): Avoid a "definitely lost" memory leak warning from valgrind, reported by Bernhard Voelker.
2015-04-01doc: clarify that ls --sort=time is newest firstPádraig Brady
* src/ls.c (usage): Add punctuation to avoid ambiguity in the description of the --time option. Mention that both the -u and --sort=time default order is newest first.
2015-03-31tail: fix -f to follow changes after a renameStephane Chazelas
* src/tail.c (tail_forever_inotify): Only monitor write()s and truncate()s to files in --follow=descriptor mode, thus avoiding the bug where we removed the watch on renamed files. Also adjust the inotify event processing code that is now significant only in --follow=name mode. * tests/tail-2/F-vs-rename.sh: Improve this existing test by running in both polling and inotify modes. * tests/tail-2/f-vs-rename.sh: A new test based on the existing one. * tests/local.mk: Reference the new test. * NEWS: Mention the bug. Fixes http://bugs.gnu.org/19760
2015-03-29doc: move numfmt info to the 'Numeric operations' sectionPádraig Brady
* doc/coreutils.texi: Move numfmt info to this section, as numfmt functionality aligns more with seq and factor, than fmt and pr etc.
2015-03-27nohup: clarify stdin redirectionPaul Eggert
Problem reported by Isaac Schwabacher in: http://bugs.gnu.org/20214 * doc/coreutils.texi (nohup invocation): Clarify that when nohup's stdin gets redirected, it's unreadable. * doc/coreutils.texi (nohup invocation): * src/nohup.c (usage): Don't promise /dev/null.
2015-03-27tests: fix false test failure with df on Debian/kFreeBSDAssaf Gordon
* tests/fs/skip-duplicates.sh: On this platform .mnt_opts is significant so define to empty to avoid a NULL deref in read_file_system_list(). Fixes http://bugs.gnu.org/20210
2015-03-26doc: disambiguate the ls --color descriptionChristoph Anton Mitterer
* src/ls.c (usage): Avoid the implication that the default ls behavior is to --color=always. Reported in http://bugs.debian.org/781208
2015-03-26doc: clarify the date standard output formatsPádraig Brady
* src/date.c (usage): Use FMT rather than TIMESPEC as the parameter, since it's simpler to understand and can be better aligned. Give an example for the --iso-8601 output format. Adjust the example used for the 3 standard formats to be unambiguous with respect to day/mon ordering and use of leading zeros in the time. Reorder the options descriptions slightly, so that the 3 standards options are together. Indent the multi-line descriptions so that grouping is obvious. Remove a redundant description of the --rfc-3339 format, which is obvious in the existing example. Separate these 3 standards options to their own translatable string to simplify translation. Change 'date and time' to 'date/time' in the --iso-8601 description to be consistent with --rfc-3339 and to help avoid the implication that the time is always output or even output by default. Fixes http://bugs.gnu.org/20203
2015-03-24maint: apply basic styling to online manualPádraig Brady
* README-release: Reference http://www.gnu.org/s/coreutils/manual.css to apply basic styling to the online coreutils manual, consistent with the Emacs documentation.
2015-03-24doc: clarify the uniq -D man page descriptionPádraig Brady
* src/uniq.c (usage): The description was very confusing in the man page due to the stripped newlines. Add punctuation for clarification.
2015-03-24wc: use a more adaptive wc -l implementationPádraig Brady
* src/wc.c (wc): Allow any block to select the count implementation, rather than just using the first 10 lines. This also simplifies the code from 3 loops to 2.
2015-03-23doc: clarify default order for ls --sort=sizeDan Jacobson
* src/ls.c (usage): Mention that default order is largest first. Fixes http://bugs.gnu.org/20172
2015-03-20maint: really fix wildcard quoting in sc_tests_executablePádraig Brady
* cfg.mk (sc_tests_executable): The previous commit avoided the globbing, but also passed on the quoted wildcards to find(1). We could use eval to handle the quoting, though that's a bit awkward and dangerous, so instead explicitly disable globbing for the whole make target subshell. Note noglob is not available on solaris, where we fall back to set -f. Note also that zsh uses set -F for this, but that's moot here. Also correct the find(1) expression to include the -o between each wildcard.
2015-03-20maint: fix wildcard quoting in sc_tests_executablePádraig Brady
* cfg.mk (sc_tests_executable): If there are files with $TEST_EXTENSIONS in the current directory, then the lack of quoting of the $test_extensions_rx contents could result in globbing and an inconsequential run. find(1) produces warnings only with more than one expansion.
2015-03-20wc: speedup counting of short linesKristoffer Brånemyr
Using a test file generated with: yes | head -n100M > 2x100M.txt before> time wc -l 2x100M.txt real 0.842s user 0.810s sys 0.033s after> time wc -l 2x100M.txt real 0.142s user 0.111s sys 0.031s * src/wc.c (wc): Split the loop that deals with -l into 3. The first is used at the start of the input to determine if the average line length is < 15, and if so the second loop is used to look for '\n' internally to wc. For longer lines, memchr is used as before to take advantage of system specific optimizations which any outweigh function call overhead. Note the first 2 loops could be combined, though in testing, GCC 4.9.2 at least, wasn't sophisticated enough to separate the loops based on the "check_len" invariant. Note also __builtin_memchr() isn't significant here as GCC currently only applies constant folding with that. * NEWS: Mention the improvement.
2015-03-10yes: improve efficiency when all args aren't bufferedGiuseppe Scrivano
* src/yes.c (main): Even when the internal buffer isn't large enough, output what we've buffered already, and interate over the rest. This improves the performance in the edge case where there are many small arguments that overflow the buffer. * tests/misc/yes.sh: Add a test case for the many small arguments case.
2015-03-10yes: output data more efficientlyPádraig Brady
yes(1) may be used to generate repeating patterns of text for test inputs etc., so adjust to be more efficient. Profiling the case where yes(1) is outputting small items through stdio (which was the default case), shows the overhead of continuously processing small items in main() and in stdio: $ yes >/dev/null & perf top -p $! 31.02% yes [.] main 27.36% libc-2.20.so [.] _IO_file_xsputn@@GLIBC_2.2.5 14.51% libc-2.20.so [.] fputs_unlocked 13.50% libc-2.20.so [.] strlen 10.66% libc-2.20.so [.] __GI___mempcpy 1.98% yes [.] fputs_unlocked@plta Sending more data per stdio call improves the situation, but still, there is significant stdio overhead due to memory copies, and the repeated string length checking: $ yes "`echo {1..1000}`" >/dev/null & perf top -p $! 42.26% libc-2.20.so [.] __GI___mempcpy 17.38% libc-2.20.so [.] strlen 5.21% [kernel] [k] __srcu_read_lock 4.58% [kernel] [k] __srcu_read_unlock 4.27% libc-2.20.so [.] _IO_file_xsputn@@GLIBC_2.2.5 2.50% libc-2.20.so [.] __GI___libc_write 2.45% [kernel] [k] system_call 2.40% [kernel] [k] system_call_after_swapgs 2.27% [kernel] [k] vfs_write 2.09% libc-2.20.so [.] _IO_do_write@@GLIBC_2.2.5 2.01% [kernel] [k] fsnotify 1.95% libc-2.20.so [.] _IO_file_write@@GLIBC_2.2.5 1.44% yes [.] main We can avoid all stdio overhead by building up the buffer _once_ and outputting that, and the profile below shows the bottleneck moved to the kernel: $ src/yes >/dev/null & perf top -p $! 15.42% [kernel] [k] __srcu_read_lock 12.98% [kernel] [k] __srcu_read_unlock 9.41% libc-2.20.so [.] __GI___libc_write 9.11% [kernel] [k] vfs_write 8.35% [kernel] [k] fsnotify 8.02% [kernel] [k] system_call 5.84% [kernel] [k] system_call_after_swapgs 4.54% [kernel] [k] __fget_light 3.98% [kernel] [k] sys_write 3.65% [kernel] [k] selinux_file_permission 3.44% [kernel] [k] rw_verify_area 2.94% [kernel] [k] __fsnotify_parent 2.76% [kernel] [k] security_file_permission 2.39% yes [.] main 2.17% [kernel] [k] __fdget_pos 2.13% [kernel] [k] sysret_check 0.81% [kernel] [k] write_null 0.36% yes [.] write@plt Note this change also ensures that yes(1) will only write complete lines for lines shorter than BUFSIZ. * src/yes.c (main): Build up a BUFSIZ buffer of lines, and output that, rather than having stdio process each item. * tests/misc/yes.sh: Add a new test for various buffer sizes. * tests/local.mk: Reference the new test. Fixes http://bugs.gnu.org/20029
2015-03-07build: fix make dependencies for test.1Pádraig Brady
In certain parallel build situations this would give the error: help2man: can't get `--help' info from man/test.td/[ Makefile:14189: recipe for target 'man/test.1' failed * man/local.mk (test.1): Depend on `[` rather than `test`, as `test --help` outputs nothing. Also move dir.1 and vdir.1 back to the main list, as they're no more exceptions than sha1sum etc.
2015-03-05maint: be less strict about executable permissions of testsBernhard Voelker
With "umask 0027" or even "umask 0077", the git clone of coreutils does not have the executable bit set for 'other' (or 'group). Therefore, "make syntax-check" would fail. * cfg.mk (sc_tests_executable): Change the -perm argument of find(1) to only print the names of the files which are not executable by the user, rather than insisting on ugo+x (octal 111).
2015-03-05doc: mention persistence caveats in sync man pageStéphane Aulery
* man/sync.x ([BUGS]): Mention the caveats and reference the system call man pages for more details. Fixes http://bugs.gnu.org/19995 Debian bug #507085 reported by jidanni@jidanni.org
2015-03-04tee: generalize the --write-error option to --output-errorPádraig Brady
Adjust commit v8.23-140-gfdd6ebf to add the --output-error option instead of --write-error, and treat open() errors like write() errors. * doc/coreutils.texi (tee invocation): s/write-error/output-error/. * src/tee.c (main): Exit on open() error if appropriate. * tests/misc/tee.sh: Add a case to test open() errors. * NEWS: Adjust for the more general output error behavior. Suggested by Bernhard Voelker.
2015-03-04maint: update stale comment about ls color sequencesJarosław Gruca
* src/ls.c (color_indicator[C_END]): Comment with the correct sequence, which was used since commit v6.10-61-g483297d Fixes http://bugs.gnu.org/19992
2015-02-27tail,stat: improve support for the IBRIX file systemShane M Seymour
Note that IBRIX used to have a different magic number 0x013111A7 instead of the current 0x013111A8. However, the former is no longer used and the version of IBRIX it was used in is really ancient, so it's extremely unlikely anyone is still using it. Therefore, just add the newer magic number. Mark IBRIX as a 'remote' file system type as inotify support had never been officially tested with it. * src/stat.c (human_fstype): Add file system ID definition. * NEWS: Mention the improvement. Fixes http://bugs.gnu.org/19951
2015-02-24tee: add --write-error to control handling of closed pipesPádraig Brady
tee is very often used with pipes and this gives better control when writing to them. There are 3 classes of file descriptors that tee can write to: files(1), pipes(2), and early close pipes(3). Handling write errors to 1 & 2 is supported at present with the caveat that failure writing to any pipe will terminate tee immediately. Handling write errors to type 3 is not currently supported. To improve the supported combinations we add these options: --write-error=warn Warn if error writing any output including pipes. Allows continued writing to still open files/pipes. Exit status is failure if any output had error. --write-error=warn-nopipe, -p Warn if error writing any output except pipes. Allows continued writing to still open files/pipes. Exit status is failure if any non pipe output had error. --write-error=exit Exit if error writing any output including pipes. --write-error=exit-nopipe Exit if error writing any output except pipes. Use the "nopipe" variants when files are of types 1 and 3, otherwise use the standard variants with types 1 and 2. A caveat with the above scheme is that a combination of pipe types (2 & 3) is not supported robustly. I.e. if you use the "nopipe" variants when using both type 2 and 3 pipes, then any "real" errors on type 2 pipes will not be diagnosed. Note also a general issue with type 3 pipes that are not on tee's stdout, is that shell constructs don't allow to distinguish early close from real failures. For example `tee >(head -n1) | grep -m1 ..` can't distinguish between an error or an early close in "head" pipe, while the fail on the grep part of the pipe is distinguished independently from the resulting pipe errors. This is a general issue with the >() construct, rather than with tee itself. * NEWS: Mention the new feature. * doc/coreutils.texi (tee invocation): Describe the new option. * src/tee.c (usage): Likewise. (main): With --write-error ignore SIGPIPE, and handle the various exit, diagnostics combinations. * tests/misc/tee.sh: Tess all the new options. Fixes http://bugs.gnu.org/11540
2015-02-23tee: close "-" fileBernhard Voelker
This is a cleanup to the previous commit v8.23-138-g7ceaf1d. * src/tee.c (tee_files): Do not exempt the "-" file from being closed, as this is no longer stdout but a normal file.
2015-02-20tee: treat '-' operand as file name as mandated by POSIXBernhard Voelker
Since v5.2.1-1247-g8dafbe5, tee(1) treated '-' as stdout while POSIX explicitly requires to treat this as a file name. Revert this change, as the interleaved output - due to sending another copy of input to stdout - is not considered to be useful. Discussed in http://lists.gnu.org/archive/html/coreutils/2015-02/msg00085.html * src/tee.c (tee_files): Remove the special handling for "-" operands. (usage): Remove the corresponding sentence. * doc/coreutils.texi (common options): Remove the "tee -" example. (tee invocation): Document that tee(1) now treats "-" as a file name. * tests/misc/tee.sh: Add a test case for "tee -". While at it, re-indent the above multi-argument processing case and extend that to 13 operands, as POSIX mandates that, too. * tests/misc/tee-dash.sh: Remove now-obsolete test. * tests/local.mk (all_tests): Remove the above test. * NEWS (Changes in behavior): Mention the change.
2015-02-18tee: exit early if no more writable outputsPádraig Brady
* src/tee.c (main): Don't continue reading if we can't output anywhere. * tests/misc/tee.sh: Ensure we exit when no more outputs. * NEWS: Mention the change in behavior.