summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2004-04-21(main): Do not ignore SIGPIPE, as POSIX 1003.1-2001Jim Meyering
does not allow this. This undoes the 1996-10-24 patch.
2004-04-21 - csplit sometimes failed to remove files when interrupted.Jim Meyering
- csplit didn't clean up if two signals arrived nearly simultaneously. (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: Define. (filename_space, prefix, suffix, digits, files_created, remove_files): Now volatile. (caught_signals): New var. (cleanup): Block signals while deleting all files. (cleanup_fatal, handle_line_error, regexp_error): Mark with ATTRIBUTE_NORETURN. (create_output_file, close_output_file, interrupt_handler): Block signals while changing the number of output files, to fix some race conditions. (delete_all_files): Do nothing if remove_files is zero. Clear files_created. (main): Don't mess with signals until after argument processing is done. (main): Rewrite signal-catching code to make it similar to other coreutils programs. When processing signals, block all signals that we catch, but do not block signals that we don't catch. Avoid problems with unsigned int warnings. (interrupt_handler): Use void, not (obsolete) RETSIGTYPE. (interrupt_handler) [defined SA_NOCLDSTOP]: Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
2004-04-21 - ls could incorrectly restore color if multiple signalsJim Meyering
arrived nearly simultaneously. (main): Rewrite signal-catching code to make it similar to other coreutils programs. When processing signals, block all signals that we catch, but do not block signals that we don't catch. Avoid problems with unsigned int warnings. (sighandler) [defined SA_NOCLDSTOP]: Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent. (sighandler) [!defined SA_NOCLDSTOP]: Reset signal handler to self, not to SIG_IGN, since SIGTSTP can be received more than once. (main): Use SA_RESTART, as that is simpler than checking for EINTR failures all over the place.
2004-04-21install -s failed on System V if SIGCHLD was ignored.Jim Meyering
Include <signal.h>. (main) [defined SIGCHLD]: Set SIGCHLD handler to the default, if -s is given, since System V fork+wait does not work if SIGCHLD is ignored.
2004-04-20(is_empty_dir): Clarify comment.Jim Meyering
2004-04-20(main) [!defined _POSIX_SOURCE]:Jim Meyering
Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
2004-04-20(main): Rewrite signal-catching code to make itJim Meyering
similar to other coreutils programs. When processing signals, block all signals that we catch, but do not block signals that we don't catch. Avoid problems with unsigned int warnings. (sighandler) [defined SA_NOCLDSTOP]: Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
2004-04-20(sigill_handler, isaac_seed_machdep): Use void, not (obsolete) RETSIGTYPE.Jim Meyering
2004-04-20(main) [!defined _POSIX_SOURCE]:Jim Meyering
Use simpler "signal (sig, SIG_IGN)" rather than sigaction equivalent.
2004-04-20.Jim Meyering
2004-04-20Don't include pathmax.h; system.h already does it.Jim Meyering
2004-04-20.Jim Meyering
2004-04-20(cut_fields): Free buffer upon getndelim2 failure.Jim Meyering
2004-04-19(isaac_seed_start) [AVOID_USED_UNINITIALIZED_WARNINGS]:Jim Meyering
Initialize a buffer to avoid warnings from tools like valgrind.
2004-04-19.Jim Meyering
2004-04-19Make pwd work even if the resulting name is so long that getcwd fails.Jim Meyering
(path_free, path_init, path_prepend): New functions. (nth_parent, find_dir_entry, robust_getcwd): New functions. (main): First try getcwd, then, upon failure, robust_getcwd.
2004-04-18(print_user): Use xrealloc here, rather than unchecked realloc.Jim Meyering
Remove anachronistic casts.
2004-04-18(full_filename_): Don't leak upon failed realloc.Jim Meyering
2004-04-18(readdir_ignoring_dotdirs): Move function to system.h, renaming it. Update ↵Jim Meyering
uses.
2004-04-18(readdir_ignoring_dot_and_dotdot): New inline function, from remove.c.Jim Meyering
2004-04-17(add_file_name): Declare function to be `static'.Jim Meyering
2004-04-17(ds_init, ds_free): Declare functions to be `static'.Jim Meyering
2004-04-17(string_to_join_field): Declare function to be `static'.Jim Meyering
2004-04-15Include getpagesize.h.Jim Meyering
(main): Align I/O buffers to page boundaries.
2004-04-15Include getpagesize.h.Jim Meyering
(dopass): Align I/O buffers to page boundaries.
2004-04-15Include getpagesize.h.Jim Meyering
(copy_reg): Align I/O buffers to page boundaries.
2004-04-15(gcd, lcm, ptr_align): New functions, moved from od.c.Jim Meyering
2004-04-15(gcd, lcm): Remove; now in system.h.Jim Meyering
2004-04-15(ROUND_UP_OFFSET, PTR_ALIGN): Remove.Jim Meyering
All uses replaced by ptr_align.
2004-04-15Include getpagesize.h.Jim Meyering
(main): Align I/O buffers to page boundaries.
2004-04-14.Jim Meyering
2004-04-12.Jim Meyering
2004-04-12Include "utimecmp.h".Jim Meyering
(copy_internal): Compare time stamps using utimecmp rather than MTIME_CMP.
2004-04-09Include stat-macros.h, not file-type.h.Jim Meyering
Move more definitions into stat-macros.h.
2004-04-09undo last changeJim Meyering
2004-04-09Don't include "file-type.h", now that system.h does.Jim Meyering
2004-04-09Include file-type.h rather than hard-coding allJim Meyering
of its macros definitions -- the list was slightly out of date.
2004-04-08(O_NOCTTY): Remove redundant decl.Jim Meyering
2004-04-08(flags, usage): Remove noctty flag.Jim Meyering
(main): Always use O_NOCTTY when opening files.
2004-04-08(set_fd_flags): Undo part of today's change: it's a littleJim Meyering
cleaner -- and more efficient in the common case -- to go ahead and OR in the -1 when fcntl fails.
2004-04-08(dd_copy): Mark two diagnostics for translations.Jim Meyering
2004-04-08.Jim Meyering
2004-04-08(dd_LDADD, shred_LDADD): Add fdatasync's lib.Jim Meyering
2004-04-08Correct spelling: s/shasum/sha1sum.Jim Meyering
2004-04-08(LONGEST_SYMBOL): Tweak comment.Jim Meyering
2004-04-08(set_fd_flags): Don't OR in -1 when fcntl fails.Jim Meyering
Rename parameter, flags, to avoid shadowing global.
2004-04-08New dd conv= symbols nocreat, excl, fdatasync, fsync,Jim Meyering
and new dd options iflag= and oflag=. (usage): Document. (fdatasync) [!HAVE_FDATASYNC]: New macro. (C_NOCREAT, C_EXCL, C_FDATASYNC, C_FSYNC): New macros. (input_flags, output_flags): New vars. (LONGEST_SYMBOL): New macro. (struct symbol_value): Renamed from struct conversion. Members symbol and value renamed from convname and conversion. The symbol value is now an array instead of a pointer; this saves a bit of space and time in practice. All uses changed. (conversions): Add nocreat, excl, fdatasync, fsync. Now const. (flags): New constant array. (iflag_error_msgid, oflag_error_msgid): New constants. (parse_symbols): Renamed from parse_conversion and generalized to handle either conversion or flag symbols. (scanargs): Adjust uses of parse_symbols accodingly. Add support for iflag= and oflag=. Reject attempts to use both excl and nocreat. (set_fd_flags): New function. (dd_copy): Just return X rather than calling quit (X), since our caller invokes quit with the returned value. Add support for fdatasync and fsync. (main): Add support for iflags=, oflags=, and new conv= symbols.
2004-04-08(O_DIRECT, O_DSYNC, O_NDELAY, O_NOFOLLOW, O_RSYNC, O_SYNC):Jim Meyering
Define to 0 if not already defined.
2004-04-07Add support for IUTF8 input flag.Jim Meyering
2004-04-06(makedev) [mkdev && !makedev]: Define makedev to mkdev.Jim Meyering
For Interix.