summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* maint: trivial system header file cleanupsPádraig Brady2011-01-134-7/+9
| | | | | | | | | | | | * src/system.h: Note where it should be included, and make ordering check portable to GLIBC > 2 * src/copy.c: Move <sys/ioctl.h> along with other system headers as is done elsewhere. * src/install.c: Move <sys/wait.h> along with other system headers as is done elsewhere. * src/ptx.c: Include <regex.h> rather than "regex.h" as is done elsewhere. Note <regex.h> is kept after "system.h" as per commit dba300a0.
* doc: clean up HACKING guidelinesJim Meyering2011-01-121-8/+4
| | | | | | * HACKING: Remove mention of "indent-tabs-mode: nil", since we've remove all of those directives. No longer needed. Remove dated (pre-emacs-23) reference regarding WhiteSpace mode.
* gnulib: Also use dtoastr and ldtoastr modules.Paul Eggert2011-01-111-0/+2
| | | | | | | This adjusts to the recent splitting of the ftoastr module into 3 <http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00199.html>. * bootstrap.conf (gnulib_modules): Add dtoastr, ldtoastr, as coreutils needs all 3 modules now.
* build: update gnulib submodule to latestPaul Eggert2011-01-111-0/+0
|
* rm: ignore errno related to invalid file namesNadav Har'El2011-01-112-1/+12
| | | | | | * src/remove.c (nonexistent_file_errno): Also skip EINVAL and EILSEQ, for at least smbfs rejection of '*' in file names. * NEWS: Mention the fix.
* build: update gnulib submodule to latestJim Meyering2011-01-101-0/+0
|
* du: don't abort when a subdir is renamed during traversalJim Meyering2011-01-104-4/+103
| | | | | | | | | | * NEWS (Bug fixes): Mention it. * src/du.c (prev_level): Move declaration "up" to file-scope global. (du_files): Reset prev_level to 0 upon abnormal fts_read termination. Reported by Johathan Nieder in http://bugs.debian.org/609049 Also, improve a diagnostic. * tests/du/move-dir-while-traversing: Test for the above. * tests/Makefile.am (TESTS): Add it.
* maint: suppress some clang scan-build warningsPádraig Brady2011-01-073-6/+8
| | | | | | | * src/pr.c (char_to_clump): Remove a dead store. * src/remove.c (fts_skip_tree): Likewise. * src/sort.c (key_warnings): Likewise. (sort): Suppress an uninitialized pointer warning.
* maint: replace uses of ignore_ptr with ignore_valuePádraig Brady2011-01-074-3/+3
| | | | | | | * gnulib: Update for enhanced ignore_value() * src/chcon.c (process_file): Don't use the deprecated ignore_ptr. * src/chmod.c (process_file): Likewise. * src/chown-core.c (change_file_owner): Likewise.
* post-release administriviaJim Meyering2011-01-043-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 8.9v8.9Jim Meyering2011-01-041-1/+1
| | | | * NEWS: Record release date.
* build: update gnulib to latest; portability fixesJim Meyering2011-01-041-0/+0
|
* maint: update all copyright year number rangesJim Meyering2011-01-01654-654/+654
| | | | Run "make update-copyright".
* build: update gnulib for version-etc copyright year updateJim Meyering2011-01-012-1/+1
| | | | * tests/sample-test: Update copyright to 2011, to appease syntax-check.
* maint: generate much of the THANKS fileJim Meyering2011-01-015-55/+77
| | | | | | | | | | | | | | | | | | Before this change, we had a tendency to manually list each contributor's name in THANKS. Now, each commit "Author" is included in the generated THANKS file automatically, and most of the old THANKS file is now a template, THANKS.in. We'll still have to manually list the names of people who report problems without a usable patch. * THANKS.in: New file, derived from THANKS, but removing names of those who are listed as git log 'Author:'s. * THANKS: Remove file. * thanks-gen: New file. * Makefile.am (THANKS): New rule. (EXTRA_DIST): Add .mailmap, THANKS.in and thanks-gen. * .gitignore: Add THANKS and THANKS-to-translators. * .mailmap: Unify on single address and name-spelling per contributor.
* maint: update to latest gnulib, for testsuite improvementEric Blake2010-12-313-10/+38
| | | | | | * gnulib: Update to latest for init.sh fix. * bootstrap: Resync from gnulib. * tests/init.sh: Likewise.
* maint: allow gettext 0.17 againEric Blake2010-12-302-2/+2
| | | | | | | | | | | | | | | | | Commit 041c9c47 traded the 'gettext' module for the lighter 'gettext-h' module, so as to not require the latest gettext release (we only need the latest release if we ship gettext as a dependent library, but coreutils has long preferred to use it as an external library). But that commit overlooked two places necessary to allow the use of gettext 0.17. This does not force you to downgrade (using gettext 0.18.1.1 is still just fine), nor does it affect tarballs (once a tarball is built with a given gettext version, it can be built on other machines regardless of what gettext version is present). * bootstrap.conf (buildreq): Relax prerequisite. * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
* split: fix the suffix length calculationPádraig Brady2010-12-304-12/+38
| | | | | | | | | | * src/split.c (set_suffix_length): Only auto-calculate the suffix length when the number of files is specified. * tests/misc/split-a: Add a case to trigger the bug, and exercise the suffix length auto-calculation. * NEWS: Mention the fix. Reported by Dmitry V. Levin and Sergey Vlasov at https://bugzilla.altlinux.org/show_bug.cgi?id=24841
* coreutils: keep lines within 80-column limitsPaul Eggert2010-12-2860-232/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cfg.mk (LINE_LEN_MAX, FILTER_LONG_LINES): New macros. (sc_long_lines): New rule. * HACKING: Use shorter URLs to the same material. * doc/Makefile.am, doc/coreutils.texi, m4/boottime.m4: * man/help2man, man/stdbuf.x, src/Makefile.am, src/cat.c, src/copy.c: * src/cp.c, src/dd.c, src/df.c, src/du.c, src/groups.c, src/install.c: * src/ls.c, src/md5sum.c, src/mv.c, src/od.c, src/pinky.c, src/ptx.c: * src/readlink.c, src/remove.c, src/rmdir.c, src/setuidgid.c: * src/sort.c, src/tail.c, src/touch.c, tests/Coreutils.pm: * tests/cp/existing-perm-race, tests/cp/perm, tests/cp/preserve-gid: * tests/du/2g, tests/du/long-from-unreadable, tests/init.sh: * tests/install/basic-1, tests/ls/nameless-uid: * tests/ls/readdir-mountpoint-inode, tests/misc/chroot-credentials: * tests/misc/cut, tests/misc/date, tests/misc/join, tests/misc/md5sum: * tests/misc/sha1sum, tests/misc/sha224sum, tests/misc/sort: * tests/misc/sort-continue, tests/misc/sort-files0-from: * tests/misc/sort-rand, tests/misc/stdbuf, tests/misc/tr: * tests/misc/uniq, tests/mv/atomic, tests/mv/part-fail: * tests/mv/part-symlink, tests/mv/sticky-to-xpart, tests/pr/pr-tests: * tests/rm/fail-2eperm, tests/rm/interactive-always: Reformat to fit within 80 columns. * doc/Makefile.am (BAD_POSIX_PERL): New macro. * doc/coreutils.texi: Reword slightly, to make menus and index lines shorter. * src/md5sum.c: Redo --help output so that it fits within 79 columns, since that's a bit more portable and all the other --help strings fit in 79 columns.
* maint: avoid syntax-check failure due to unused #includeJim Meyering2010-12-241-1/+0
| | | | * src/getlimits.c: Don't include "c-ctype.h"; no longer used.
* csplit: diagnose file counter wraparoundPaul Eggert2010-12-231-8/+16
| | | | | | | * src/csplit.c (create_output_file): Detect overflow when the file counter wraps around, and exit with a diagnostic. Formerly the code silently wrapped around and wrote to the wrong file, losing output data.
* sort: minor performance tweak with num_processorsPaul Eggert2010-12-221-2/+2
| | | | * src/sort.c (main): Don't invoke num_processors twice.
* getlimits: port to hosts with very wide int, or non-ASCIIPaul Eggert2010-12-221-50/+24
| | | | | | | | | * src/getlimits.c (decimal_ascii_add): Remove, replacing with ... (decimal_absval_add_one): New function, with different signature, which does not assume ASCII. All callers changed. (print_int): Remove assumptions that integers fit in 206 bits, and that characters are ASCII. These assumptions are portable in practice but are easy to remove here.
* post-release administriviaJim Meyering2010-12-223-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 8.8v8.8Jim Meyering2010-12-221-1/+1
| | | | * NEWS: Record release date.
* csplit: update gnulib for Solaris 8,9 snprintf fixJim Meyering2010-12-221-0/+0
|
* maint: correct test-related commentsJim Meyering2010-12-222-2/+4
| | | | | | | * tests/mv/i-3: Adjust comment to match just-changed code. Spotted by Pádraig Brady. * tests/init.cfg (retry_delay_): Correct spelling of function name in usage example.
* tests: adjust preceding change to handle general WERROR_CFLAGS valuesJim Meyering2010-12-221-3/+3
| | | | | | * gnulib-tests/Makefile.am (test_xvasprintf_CFLAGS): (test_lock_CFLAGS, test_tls_CFLAGS): Avoid a syntax error when $(WERROR_CFLAGS) expands to more than one token.
* tests: do not assume compiler knows -Wxxx flagsPaul Eggert2010-12-221-4/+7
| | | | | | | | * gnulib-tests/Makefile.am (test_xvasprintf_CFLAGS): (test_lock_CFLAGS, test_tls_CFLAGS): Do not append GCC-specific flags like -Wno-format-security unless the GCC-specific flag -Werror is also specified. This avoids a "make check" failure on Solaris when using Sun C 5.8.
* tests: mv/i-3: avoid false-positive failure on a slow/busy systemJim Meyering2010-12-221-1/+1
| | | | | * tests/mv/i-3: Quadruple the timeout duration. Without this, I saw an expired timeout on a heavily-loaded system.
* tests: avoid new false-positive failure on at least FreeBSD 8.1Jim Meyering2010-12-211-0/+4
| | | | | * tests/mv/trailing-slash: Accommodate different diagnostic on FreeBSD 8.1.
* who: omit useless definitions of MAXHOSTNAMELENPaul Eggert2010-12-202-8/+0
| | | | | | | This prevents a compilation failure on Solaris 8, GCC 4.4.2, with "configure --enable-gcc-warnings". * src/who.c (MAXHOSTNAMELEN): Remove; no longer needed. * src/pinky.c: Likewise.
* maint: fix a typo in sort --parallel help messagePádraig Brady2010-12-203-1/+3
| | | | | | | Also fix up Chen Guo's contacts * src/sort.c (usage): Add a missing "of" * THANKS: Add Chen Guo * .mailmap: Add Chen Guo's UCLA address
* build: update gnulib: ACL-vs-Solaris 8 portability etc.Jim Meyering2010-12-201-0/+0
|
* tests: sync init.sh from gnulibPaul Eggert2010-12-181-5/+7
| | | | | | * tests/init.sh (setup_): Initialize fail=0 before invoking mktempd_. Ensure that IFS is defined initially. (mktempd_): Remove fail=0 initialization; no longer needed.
* wc: fix a possible hang with --files0-fromPádraig Brady2010-12-191-2/+2
| | | | | | * src/wc.c (main): exit when we get a read error on the --files0-from file, rather than retrying and spinning the CPU
* cp: ensure backups are created when -T specifiedPádraig Brady2010-12-192-2/+4
| | | | | | | * src/cp.c (do_copy): When -T is specified, initialize the NEW_DST and SB variables, which are checked when running: cp -T --force --backup file file * tests/cp/backup-1: Add the -T case
* sort: use at most 8 threads by defaultPádraig Brady2010-12-196-13/+28
| | | | | | | | | | | | | | | | * src/sort.c (main): If --parallel isn't specified, restrict the number of threads to 8 by default. If the --parallel option is specified, then allow any number of threads to be set, independent of the number of processors on the system. * doc/coreutils.texi (sort invocation): Document the changes to determining the number of threads to use. Mention the memory overhead when using multiple threads. * tests/misc/sort-spinlock-abuse: Allow single core systems that support pthreads. * tests/misc/sort-stale-thread-mem: Likewise. * tests/misc/sort-unique-segv: Likewise. * NEWS: Mention the change in behaviour.
* doc: split: add examples showing how to use the new optionJim Meyering2010-12-181-0/+61
| | | | * doc/coreutils.texi (split invocation): Add examples.
* tests: avoid spurious du/bigtime failureJim Meyering2010-12-182-0/+6
| | | | | | * tests/du/bigtime: Map nonzero block count to 0. Reported by Assaf Gordon. * THANKS: Update.
* tests: set fail=0 by defaultPaul Eggert2010-12-171-0/+3
| | | | | | | * tests/init.sh (setup_): Set fail=0. This was the intent as per <http://lists.gnu.org/archive/html/bug-coreutils/2010-12/msg00058.html> but the assignment in mktempd_ is ineffective, since mktempd_ is used inside `` and its assignments are in a subshell.
* build: update gnulib submodule to latestJim Meyering2010-12-171-0/+0
|
* sort: do not generate thousands of subprocesses for 16-way mergePaul Eggert2010-12-162-14/+23
| | | | | | | | | | | | | | | | | | Without this change, tests/misc/sort-compress-hang would consume more than 10,000 process slots on my RHEL 5.5 x86-64 server, making it likely for other applications to fail due to lack of process slots. With this change, the same benchmark causes 'sort' to consume at most 19 process slots. The change also improved wall-clock time by 2% and user+system time by 14% on that benchmark. * NEWS: Document this. * src/sort.c (MAX_PROCS_BEFORE_REAP): Remove. (reap_exited): Renamed from reap_some; this is a more accurate name, since "some" incorrectly implies that it reaps at least one process. All uses changed. (reap_some): New function: it *does* reap at least one process. (pipe_fork): Do not allow more than NMERGE + 2 subprocesses. (mergefps, sort): Omit check for exited processes: no longer needed, and anyway the code consumed too much CPU per line when 2 < nprocs.
* sort: fix hang with sort --compressPaul Eggert2010-12-164-80/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Document this. * src/sort.c (UNCOMPRESSED, UNREAPED, REAPED): New constants. (struct tempnode): New member 'state', to hold these constants. The pid member is now undefined if state == UNCOMPRESSED. (struct sortfile): Replace member 'pid' with member 'temp'. (uintptr): Remove. (proctab_hasher, proctab_comparator, register_proc, delete_proc): Proctab entries are now struct tempnode *, not pid_t, to handle the case where multiple tempnode objects correspond to the same pid. This avoids a race condition that can cause a hang. (register_proc): Arg is now struct tempnode *, not pid_t. All callers changed. (delete_proc): Set tempnode state to REAPED. (create_temp_file): No need to set pid member here; it's now done when the pid is known. (maybe_create_temp, create_temp): Remove PPID arg. Return struct tempnode *, not char *. All callers changed. (maybe_create_temp): Set node state to UNCOMPRESSED or UNREAPED. No need to set node->pid to 0. (open_temp): Replace NAME and PID args with a single TEMP arg. All callers changed. Wait only for unreaped children. (zaptemp): Wait for decompressor to finish before removing its temporary-file input. This avoids .nfsXXXX hassles with NFS and fixes a race (leading to a hang) regardless of NFS. (open_input_files): Adjust to new way of dealing with temp files and their subprocesses. * tests/Makefile.am (TESTS): Add misc/sort-compress-hang. * tests/misc/sort-compress-hang: New file.
* sort: don't dump core when merging from input twicePaul Eggert2010-12-163-25/+39
| | | | | | | | | | * NEWS: Document this. * src/sort.c (avoid_trashing_input): The previous fix to this function didn't fix all the problems with this code. Replace it with something simpler: just copy the input file. This doesn't change the number of files, so return void instead of the updated file count. Caller changed. * tests/misc/sort-merge-fdlimit: Test for the bug.
* doc: tail: semi-deprecate --sleep-interval and --max-unchanged-statsJim Meyering2010-12-142-3/+7
| | | | | | | | | | Those options are useful only on systems that lack inotify support and in the unusual event that a system with inotify support must resort to polling. * src/tail.c (usage): Note that the --max-unchanged-stats=N and --sleep-interval=N options are rarely useful on systems with inotify support. * doc/coreutils.texi (tail invocation): Likewise.
* sort: fix very-unlikely buffer overrun when merging to input filePaul Eggert2010-12-141-3/+2
| | | | | | | | * src/sort.c (avoid_trashing_input): Fix a typo that could cause a buffer overrun in theory. In practice this is extremely unlikely, as it requires running out of file descriptors in a small merge, presumably because some other process is hogging all the OS's file descriptors.
* sort: document --compress reaper fixesPaul Eggert2010-12-141-0/+2
| | | | * NEWS: Document the --compress reaper fixes installed yesterday.
* tests: default to /tmp as the temporary directoryPaul Eggert2010-12-143-13/+7
| | | | | | | | | | | * tests/check.mk (TESTS_ENVIRONMENT): Default TMPDIR to /tmp, rather than to the working directory; this is more common in practice, which makes the tests more real-worldish; and it is often faster. Also, it avoids some problems with NFS cleanups. * tests/misc/sort-compress: Remove unnecessary code setting TMPDIR. * tests/misc/sort-compress-proc: Likewise. Do the final sleep only if TMPDIR is relative, which should be rarely given the change to TESTS_ENVIRONMENT.
* sort: fix some --compress reaper bugsPaul Eggert2010-12-133-90/+148
| | | | | | | | | | | | | | | | | | | | | | * src/sort.c (uintptr): New type. (enum procstate, struct procnode, update_proc): Remove. (proctab_hasher, proctab_comparator, register_proc, wait_proc): (reap_some): The proctab is now simply a hash of process-IDs rather than of pointers to objects with reference counts and states; this is smaller and faster and easier to understand. (nprocs): Now pid_t, not size_t, since one cannot have more than PID_MAX children. (reap): If the argument is -1, wait; if 0 (a new value), do not. Delete pid from proctab as needed. Ignore children that are not in proctab, as they are from the program that exec'ed us and are irrelevant to our success or failure. (delete_proc, reap_all): New functions. (open_temp): Register the child. (sort): Clean up all children afterwards; without this patch, 'sort' sometimes missed failures in children due to race conditions. * tests/Makefile.am (TESTS): Add misc/sort-compress-proc. * tests/misc/sort-compress-proc: New file, to test for the bugs fixed above.