aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/git-hooks/commit-msg
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2025-07-31 12:31:58 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2025-08-03 19:48:05 -0700
commitd3c7072a0950c57c52a4e1856109d084a6d09593 (patch)
tree0aa37cedbc0c950b2d2c33d0ef7126becfe184d3 /scripts/git-hooks/commit-msg
parenttail: prefer signed types to size_t, blksize_t (diff)
downloadcoreutils-d3c7072a0950c57c52a4e1856109d084a6d09593.tar.gz
coreutils-d3c7072a0950c57c52a4e1856109d084a6d09593.zip
maint: prefer 'read' to 'safe_read'
In the old days, safe_read acted more like what full_read does now. When that went away, some code that invoked safe_read should have gone back to plain 'read' but I guess we never got around to it. Simplify this code by going back to plain 'read'. Use safe_read only in csplit.c, which has a signal handler and where 'read' can therefore fail with EINTR. Although safe_read also checks for oversize buffers, that is better done via io_blksize. * src/cat.c (simple_cat, cat): * src/head.c (copy_fd, elide_tail_lines_pipe) * src/tac.c (tac_seekable, copy_to_temp): (elide_tail_lines_seekable, head_lines): * src/tail.c (dump_remainder, file_lines, pipe_lines) (pipe_bytes, start_bytes, start_lines, tail_forever_inotify): * src/tr.c (plain_read): Use plain 'read', not safe_read, since there is no need to worry about signals or oversize requests. Also, there is no longer a need to include safe-read.h. * src/ioblksize.h: Include sys-limits.h, for SYS_BUFSIZE_MAX. (io_blksize): Max out at SYS_BUFSIZE_MAX.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions