9718 Commits
Author SHA1 Message Date
Collin Funk 9e804edddb printf: quote the ignored characters in the warning
* src/printf.c (STRTOX): Add a call to quote when printing the ignored
characters.
* tests/printf/printf.sh: Adjust an existing test case. Add another
quoting test case.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-I9I24ON7.
2026-10-27 18:16:03 -07:00
Collin Funk c242899118 nl: don't treat empty lines as headers with an empty -d argument
* src/nl.c (check_section): Add a check for a zero section delimiter
length.
* tests/nl/nl.sh: Add a test case.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-PDYYNTYZ.
2026-10-27 18:16:03 -07:00
Pádraig Brady 266abf3fd2 cksum: fix --check ambiguities in base64 detection
* src/cksum (valid_digits): Use '=' to disambiguate hex and base64.
(split_3): Likewise.
(digest_check): Likewise.
* tests/cksum/cksum-base64-untagged.sh: Add a test case.
* NEWS: Mention the fix.
2026-10-27 23:15:56 +00:00
Pádraig Brady 119cabc8a1 cksum: support mixed reversed format checksum files
* src/cksum.c (digest_check): Reset the detection flag per file.
* tests/cksum/cksum-c.sh: Add a test case.
* tests/cksum/md5sum-bsd.sh: Likwise.
* NEWS: Mention the fix.
2026-10-27 23:15:56 +00:00
Pádraig Brady 1ca499910a cksum: fix incorrectly accepting lengths on fixed length algorithms
* src/cksum.c (split_3): Restrict to length variable digest types.
* tests/cksum/cksum-c.sh: Add test cases.
* NEWS: Mention the fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-ATAXIQDM.
2026-10-27 23:15:56 +00:00
Pádraig Brady 9f49862b99 cksum: fix -a sha2 --check handling of mixed length checksums
It's not a usual case, but for consistency "-a sha2" should support
e.g. untagged checksums that are a mix of sha256sum and sha512sum.

* src/cksum.c (split_3): Reset the sha2 variant search if
the generic sha2 is specified.  It's ok to reset the global
CKSUM_ALGORITHM as its subsequent use is conflicting with
the specific chosen variant.
* tests/cksum/cksum-c.sh: Add test cases.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-83HIODH2.
Discovered by SecBuddyF (with Hy4-preview) of Tencent KeenSecurityLab.
2026-10-27 23:15:56 +00:00
Pádraig Brady 46776b5e80 timeout: fix handling of --signal=CHLD and --signal=ALRM
These signals are used by timeout(1) itself, so need special handling.
Since commit v8.13-11-g80a1aca0d we incorrectly ignored them,
which was exacerbated by commit v8.26-39-g2f69dba5d which caused
the -sCHLD case to hang upon child exit.

* src/timeout.c (send_sig): Don't ignore SIGHLD, and discard
the self sent SIGALRM, and rearm the handler.
* tests/timeout/timeout.sh: Add test cases.
* NEWS: Mention the fixes.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-2EQL2L05.
2026-10-27 23:15:30 +00:00
Pádraig Brady 90843a2dc9 timeout: ensure we can --kill-after with blocked --verbose output
* NEWS: Adjust to mention that -k without -f is resilient to blocking.
* src/timeout.c (cleanup): Unblock SIGALRM when diagnosing, so
an armed --kill-after is honored.
* tests/timeout/timeout.sh: Add a test case.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-GV4Z4T3T.
2026-10-27 23:15:30 +00:00
Pádraig Brady 8fcaebfe47 timeout: ensure we timeout with --verbose failures
In the edge case where --verbose diagnostics might block
or induce signals, ensure we always timeout the monitored command
and do not loop diagnosing diagnostic induced signals.

* NEWS: Mention the bug fix.
* src/timeout.c (cleanup): Avoid diagnosing SIGPIPE and SIGXFSZ.
Also send the signal before diagnosing to ensure command is timed out.
* tests/env/env-signal-handler.sh: Run timeout(1) with -f to ensure
the SIGKILL is diagnosed.
* tests/timeout/timeout.sh: Likewise.  Also add test cases for
SIGPIPE and SIGXFSZ.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-GV4Z4T3T.
2026-10-27 23:15:30 +00:00
Collin Funk a514201deb od: improve overflow detection and fix a crash when used on /dev/zero
* src/od.c (format_address_std): Add an affirm call to check that the
address is positive or equal to zero, which would have caused a
descriptive assertion in this case instead of a SIGSEGV.
(offset_add): New function.
(dump): Use it to diagnose overflows.
(dump_strings): Likewise.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-EZXPB4TK.
2026-10-26 18:01:52 -07:00
Collin Funk 5471637563 getlimits: print the limits for 'unsigned short'
* src/getlimits.c (USHRT_MIN): New macro.
(main): Print the limits for 'unsigned short'.
2026-10-25 17:20:53 -07:00
Collin Funk 7d74e197bb cp: quote directory names when --parents and --verbose are used
* src/cp.c (make_dir_parents_private): Quote the names of the directory
and the source.
* tests/cp/verbose-parents-quote.sh: New file
* tests/local.mk (all_tests): Add the new test.
* NEWS: Mention the bug.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-JJG3V3T9.
2026-10-25 14:32:32 -07:00
Collin Funk 074be5fae5 chown,chgrp: don't print uninitialized ownership info on dangling links
* src/chown-core.c (change_file_owner): Set the pointer to NULL if
fstatat fails.
* tests/chgrp/verbose-dangling-symlink.sh: New file.
* tests/chown/verbose-dangling-symlink.sh: New file.
* tests/local.mk (all_tests): Add the new tests.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-YYGC42VE.
2026-10-25 14:32:32 -07:00
Collin Funk 50a76c6ce0 mv: don't block when setting the SELinux security context on a FIFO
* src/selinux.c (restorecon_private): Open the file with O_NOCTTY and
O_NONBLOCK.
* tests/misc/selinux.sh: Add a test case.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-L5GJ7M7X.
2026-10-24 12:22:36 -07:00
Mark Wielaard 45e98f93b3 cat: avoid apparent leaked FDs after splice
splice_cat can leave open file descriptors around. This breaks the
valgrind testsuite with --track-fds=yes. This is fairly innocent, like
still reachable memory, but does need a new suppression when tracking
file descriptor handling.  Introduce a new splice_cat_close function
that can be used on error from splice_cat and before exiting main.

* src/cat.c (splice_cat): Move static pipefd and pipefd_pipe_size to
file level, guarded by HAVE_SPLICE. Move pipefd close and cleanup from
error handler to...
(splice_cat_close): New function. Empty if we don't HAVE_SPLICE.
(main): Call splice_cat_close before exit.
2026-10-24 16:15:02 +01:00
Devel 2552293c5b tail: output an ERANGE error when unchanged stats flag is too small
Link: https://github.com/coreutils/coreutils/pull/387
2026-10-24 15:03:47 +01:00
Collin Funk 499a55e03d cp: quote destination name when preserving ownership on symlinks fails
* src/copy.c (copy_internal): Add a missing quoteaf call.
* tests/cp/link-no-deref.sh: Invoke getlimits_ and uses_strace_. Inject
an error using 'strace' to verify the name of the destination is quoted
in the error message.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-3M3N6L8K.
2026-10-23 19:31:50 -07:00
Collin Funk 479317e6ce doc: dircolors: document reading from standard input
* src/dircolors.c (usage): Note that standard input is read when FILE is
"-".
* doc/coreutils.text (dircolors invocation): Likewise.
2026-10-23 19:31:38 -07:00
Collin Funk 2c2a1334fa factor: fix an infinite loop with some large numbers
* src/factor.c (mulredc2): Add the carry to p1, which is the high word
of a two-word integer created by summing two single-word integers and is
therefore unable to overflow, instead of using a low word r0, which may
wrap around by adding the carry.
* tests/factor/mulredc2-infloop.sh: New file.
* tests/local.mk (all_tests): Add the new test.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-CFUR0JKW.
2026-10-23 19:30:36 -07:00
Pádraig Brady 3a1595e2af cksum: improve --length diagnostics for negative numbers
Before:

  $ cksum --length -1 -a sha2 /dev/null
  cksum: invalid length: ‘-1’: Value too large for defined data type

After:

  $ cksum --length -1 -a sha2 /dev/null
  cksum: invalid length: ‘-1’
  cksum: digest length for ‘SHA2’ must be 224, 256, 384, or 512

* src/cksum.c: Avoid EOVERFLOW for negative numbers
(similarly to commit v9.5-71-gf2c84fe63).

Link: https://github.com/coreutils/coreutils/issues/386
2026-10-24 00:25:15 +01:00
Pádraig Brady 12244b4f2b tail: fix handling of inotify event queue overflow
* src/tail.c (tail_forever_inotify): Fallback to polling upon overlow.
* tests/tail/inotify-overflow.sh: Add a new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-UUNT73BK.
2026-10-23 17:02:33 +01:00
Pádraig Brady 38aaf5e611 all: quote more user originated strings
* src/csplit.c: Quote arbitrary strings for clarity/safety.
* src/dircolors.c: Likewise.
* src/env.c: Likewise.
* src/split.c: Likewise.
* src/uniq.c: Likewise.
* tests/env/env-S.pl: Adjust accordingly.
* NEWS: Mention the improvement.
2026-10-23 14:08:24 +01:00
Paul Eggert 9192fd32e0 date: bring back -u complexity with putenv
This reverts my commit b64f9bfe4f
dated 2026-04-02.  I forgot that posixtime cares whether
-u has been specified, and gets that info via TZ.
It also uses xsetenv rather than the old putenv.
This fixes ANT-2026-LR8TONF4.
* configure.ac (LOCALTIME_CACHE): Bring this back.
* src/date.c (TZSET): Bring this back.
(main): Bring back setting TZ="UTC0" in the environment.
However, use xsetenv rather than putenv, as that’s simpler.
2026-10-22 21:21:18 -07:00
Pádraig Brady 4c4f2f55c3 basenc: fix incorrect base32hex input validation
* src/basenc.c (base32hex_decode_ctx_wrapper): Ensure we don't
accept base32 only characters for base32hex.
* tests/basenc/basenc.pl: Ensure negative base32hex tests have the
appropriate number of characters to test character validation
rather than just input size validation.
* NEWS: Mention the bug fix.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-EP1XO2G4.
2026-10-22 13:54:39 +01:00
Collin Funk b919020cf5 factor: fix suffix validation on large integers
* src/factor.c (strtouuint): Return LONGINT_OVERFLOW only if all of the
characters are digits; otherwise, return LONGINT_INVALID.
* tests/factor/factor.pl: Add two test cases.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-IZ8PFQ7Q.
2026-10-21 20:00:43 -07:00
Pádraig Brady 218f81d978 stty: consistently honor the last specified speed
stty currently fails like:

  $ stty 9600
  $ saved=$(stty -g)
  $ stty 19200 "$saved"  # Sets 9600 but reports failure
  stty: 'standard input': unable to perform all requested operations

Whereas these work fine:

  $ stty 19200 9600
  $ stty "$saved" 19200

* NEWS: Mention the bug fix.
* src/speedgen (cbaud_to_speed): Determine the speed
from the control flag encoding.
* src/stty.c (recover_mode): If no separate speed specified,
update the speed from the specified control flags.
* tests/stty/stty-save-speed.sh: Add test cases.
2026-10-21 12:54:34 +01:00
Pádraig Brady 60e7bf4121 stty: support save/restore of speeds not encoded in control flags
Note this changes the output format of -g.
POSIX states that the -g format only needs to be compatible
with the stty implementation that produced it.
However we improve compatibility on Linux by only outputting
the explicit speeds when they're not encoded in the control flags.

* NEWS: Mention the change in behavior.
* src/stty.c (display_recoverable): Output the speeds if needed.
(recover_mode): Read the speeds if present.
* tests/stty/stty-save-speed.sh: Add a new test.
* tests/local.mk: Reference the new test.

Link: https://github.com/coreutils/coreutils/issues/384
2026-10-21 12:46:48 +01:00
Collin Funk f8ba084b3f stty: don't treat baud rates of (speed_t) -1 as invalid
* src/stty.c (struct speed_desc): New type, used to differentiate
between errors and (speed_t) -1.
(last_ibaud, last_obaud): Define variables as struct speed_desc instead
of speed_t.
(check_speed): Adjust uses of last_ibaud and last_obaud to their new
definitions.
(set_speed): Likewise. Use a struct speed_desc as the argument instead
of speed_t. Check for its validity using the valid member instead of
whether it is equal to (speed_t) -1.
(apply_settings): Use struct speed_desc instead of speed_t to store the
result of string_to_baud. Check for its validity using the valid member
instead of whether it is equal to (speed_t) -1.
(string_to_baud): Adjust the function to return a struct speed_desc
instead of speed_t.
* src/speedgen (value_to_baud): Likewise.
* NEWS: Mention the bug fix.

Link: https://github.com/coreutils/coreutils/issues/383
2026-10-19 18:23:56 -07:00
Collin Funk cc6a346226 stty: reduce the number of strtoul calls
$ ltrace -c ./src/stty-prev 38400 2>&1 | grep 'strtoul$' \
        | cut --output-delimiter=' ' -w -f 5-6
    4 __isoc23_strtoul
    $ ltrace -c ./src/stty 38400 2>&1 | grep 'strtoul$' \
        | cut --output-delimiter=' ' -w -f 5-6
    2 __isoc23_strtoul

* src/stty.c (set_speed): Add a baud rate parameter. Remove a call to
string_to_baud.
(apply_settings): When calling string_to_baud, save the return value and
pass it to set_speed.
2026-10-19 18:23:56 -07:00
Collin Funk 1d5142dc09 all: use the basename of argv[0] for the comm value in the single binary
This preserves any program name transformations, e.g., when
--program-prefix=g is used as a configuration option, unlike commit
ef874ed6c (all: set /proc/self/comm to the program name in the single
binary, 2026-10-17).

* src/coreutils.c (launch_program): Use the last component of argv[0]
when setting the comm value using prctl (PR_SET_NAME, ...).
* tests/misc/proc-self-comm.sh: When using
--enable-single-binary=shebangs, test that the comm value preserves any
program name transformations, e.g., --program-prefix=g.
* NEWS: Adjust the NEWS entry to refer to last component of argv[0]
instead of the program name.
Suggested by Pádraig Brady.
2026-10-18 09:43:44 -07:00
Yu Watanabe ef874ed6ce all: set /proc/self/comm to the program name in the single binary
When built with --enable-single-binary=symlinks, the process name
(comm) previously contained the path component. Use prog_name instead of
argv[0] to set the correct process name without the path.

    Before:
    $ src/sleep 10000 &
    [1] 601333
    $ cat /proc/601333/comm
    src/sleep

    After:
    $ src/sleep 10000 &
    [1] 618100
    $ cat /proc/618100/comm
    sleep

* src/coreutils.c (launch_program): Use the program name instead of
argv[0] when calling prctl (PR_SET_NAME, ...).

Link: https://github.com/coreutils/coreutils/pull/382
2026-10-16 21:11:25 -07:00
Ismail Ramzi e9381ce5c7 maint: use to_uchar before isspace in --help markup
oputs_() scans the option text of translated usage strings and passes
each char directly to isspace().  Translated help text routinely holds
bytes >= 0x80, which are negative where char is signed, so isspace() is
called with a value outside its defined domain (unsigned char or EOF),
which is undefined behavior.  Route the arguments through to_uchar() as
done for ctype calls elsewhere in src/.

* src/system.h (oputs_): Pass isspace() arguments through to_uchar().
Copyright-paperwork-exempt: Yes

Link: https://github.com/coreutils/coreutils/pull/381
2026-10-16 21:57:23 +01:00
Collin Funk e3dd28f790 maint: ptx: use a stricter COUNTED_BY for the word table
* src/ptx.c (WORD_TABLE): Change the COUNTED_BY to use the length member
instead of alloc.
(digest_word_file): Increment the length before appending to the table
otherwise -fsanitize=bounds would kill the program.
2026-10-16 00:15:31 -07:00
Collin Funk 051456d414 maint: split: use COUNTED_BY for the list of open pipes
* src/split.c (open_pipes): Define as a struct containing the previously
global variables. Use COUNTED_BY.
(open_pipes_alloc, n_open_pipes): Remove variables moved into the newly
added struct.
(create): Update uses of the previously existing globals to reference
the open_pipes struct.
(closeout): Likewise. Don't decrement the pipe bounds until after we
make our final access to the last pipe in the array, to satisfy the
requirements of the COUNTED_BY attribute.
2026-10-15 17:33:05 -07:00
Collin Funk 4524916551 maint: sort: use COUNTED_BY for the list of temporary directories
* src/sort.c (temp_dirs): Define as a struct containing the previously
global variables. Use COUNTED_BY.
(temp_dir_count, temp_dir_alloc): Remove variables moved into the newly
added struct.
(create_temp_file, open_temp, main): Update uses of the previously
existing globals to reference the temp_dirs struct.
2026-10-15 17:33:05 -07:00
Collin Funk 5f2ad8da28 maint: df: refactor rows and columns to use COUNTED_BY
* src/df.c (table): Define as a struct containing the previously global
variables. Use COUNTED_BY.
(columns, ncolumns, ncolumns_alloc, nrows, nrows_alloc): Move into the
table struct.
(alloc_table_row, print_table, alloc_field, get_field_list, get_header)
(get_dev): Update uses of the previously existing globals to reference
the table struct.
2026-10-14 17:36:28 -07:00
Collin Funk ae58eee442 maint: factor: use a stricter COUNTED_BY on the list of factors
* src/factor.c (struct mp_factors): Change the COUNTED_BY to use the
nfactors member instead of nalloc.
2026-10-14 17:36:28 -07:00
Collin Funk a53cf09ca1 maint: join: use a stricter COUNTED_BY on fields
* src/join.c (struct line): Change the COUNTED_BY to use the nfields
member instead of nfields_allocated.
(extract_field): Increment the count before writing to the last field,
otherwise -fsanitize=bounds would kill the program.
2026-10-14 17:36:28 -07:00
Pádraig Brady 292bd77de7 stty: fix incorrectly accepting empty speeds
* src/stty.c (string_to_baud): Disallow empty speeds.
* tests/stty/stty-invalid.sh: Add checks.
* NEWS: Mention the bug fix.

Link: https://github.com/coreutils/coreutils/issues/380
2026-10-14 18:07:23 +01:00
Iván Ezequiel Rodriguez 6ab90e2010 tail: improve scalability of follow-by-name directory events
Replace the O(N) scan of watched names on each directory inotify event
with a Hash_table keyed by (parent_wd, basename), addressing the
long-standing FIXME in tail_forever_inotify.

Keep ownership consistent with wd_to_name: parent_by_name is created
only for Follow_name and returned to the caller, so fallback paths can
return without local hash cleanup.

Hash basenames with hash_string() and mix in parent_wd, matching the
existing gnulib helper rather than a hand-rolled string hash.

Matching cost for N directory events that each compare against N names
(illustrative host timings of the scan vs hash lookup alone):

  N=1000:  ~0.018s -> ~0.000s
  N=5000:  ~0.39s  -> ~0.000s
  N=10000: ~1.5s   -> ~0.000s

End-to-end recreate storms remain largely file-system bound on this
host; the hash removes the quadratic name-matching CPU from that path.

* src/tail.c (parent_name_hasher, parent_name_comparator): New.
(tail_forever_inotify): Build and use parent_by_name; return it to the
caller.
(main): Free parent_ht when non-NULL.
* tests/tail/inotify-parent-hash.sh: Require notification mode; cover
multiple names in one directory and the same basename in two
directories.
* tests/local.mk: Reference the new test.
* NEWS: Mention the improvement.
2026-10-13 14:33:22 +01:00
Ismail Ramzi 951dd1891c maint: ptx,csplit: use the COUNTED_BY attribute for heap buffers
* src/csplit.c (struct buffer_record): Annotate the input data
area with COUNTED_BY (bytes_alloc).
* src/ptx.c (WORD_TABLE): Annotate the word array with
COUNTED_BY (alloc), moving the count field ahead of the pointer
so the attribute can reference an already-declared field.

Link: https://github.com/coreutils/coreutils/pull/377
2026-10-13 12:37:27 +01:00
Pádraig Brady 4050c7c951 maint: ls: refactor extended info lookup
* src/ls.c (get_extended_info): A new function refactored
from gobble_file().  Also add comments about possible
improved file_has_aclinfo() operation.
2026-10-13 11:35:40 +01:00
Pádraig Brady 76d2d83e2c ls: avoid attribute lookup when built without selinux
* src/ls.c (gobble_file): Avoid looking up attributes
if the corresponding backends are not available.
2026-10-13 11:32:44 +01:00
Pádraig Brady 49e3a9bb49 ls: don't output ACL indicators without ACL support
Strictly we don't need libacl support to detect ACLs
as that's achieved with xattr lookup.  But doing this
will optimize ls and simplify its output, when coreutils
is not built with ACL support.

* src/ls.c (file_aclinfo_cache): Also optimize selinux ENOTSUP caching
when we don't care about ACLs.
2026-10-13 11:32:44 +01:00
Pádraig Brady 402bce6637 ls: fix missing ACL indicators or capability colors
On systems where the security context reports as unsupported,
and we encountered a file without ACLs, no further lookups
would be performed.  Introduced in commit v9.5-156-gb857d66b5.
This fix is along similar lines as commit v9.6-40-gcb2abbac7.

* src/ls.c (file_has_aclinfo_cache): Don't mark file system as
unsupported if there might be ACLs or capabilities present.
* tests/ls/acl-cache.sh: Add a new test.
* tests/local.mk: Reference the new test.
* tests/ls/acl.sh: Add a check.
* NEWS: Mention the bug fix.
2026-10-13 11:32:41 +01:00
Pádraig Brady 19cc2bad3c env: avoid an ioctl() call when not outputting
* src/env.c (main): Avoid an isatty() call
(introduced in commit v9.12-10-g782a1e5bc) when
invoking a command, and not outputting.
2026-10-12 20:55:24 +01:00
Pádraig Brady 2950a3d53d ls: avoid redundant xattr lookups for directory arguments
* src/ls.c (gobble_file): Directory args don't have their
ACL or security context displayed, so avoid to the lookup.
E.g. this results in the same number of xattr calls with
`ls -l .` and `ls -l`.
2026-10-12 20:55:24 +01:00
Collin Funk 338e04d1e1 maint: remove unnecessary configure checks for libdl and dlopen
Since commit bff0e5412 (build: sort: explicitly tag libcrypto
dependency, 2026-09-06), which added a dependency on Gnulib's sd-dlopen
module, this check has been unnecessary. This can be seen by the
separate variables in Makefile.in, which have the same purpose.

    $ grep -E '^LIB_?DL' Makefile.in
    LIBDL = @LIBDL@
    LIB_DL = @LIB_DL@

* src/local.mk (src_sort_LDADD): Use $(LIBDL) instead of $(LIB_DL).
* configure.ac: Likewise. Don't check for dlopen and libdl, which Gnulib
has already done for us.
2026-10-11 13:57:19 -07:00
Pádraig Brady 887f0a64b2 pr: improve error message for -e,-i,-n character parsing
`pr -e=-1` gives a confusing error relating to just the "-1" portion,
when in fact "=" might have been inadvertently treated as a param.
Also one gets confusing errors in the case of mishandled
multi-byte characters, if the whole argument is not diagnosed.

* src/pr.c (getoptarg): Output the complete passed argument,
to avoid the confusion with "=" being used with a short option.
* tests/pr/options.sh: Adjust accordingly.

Link: https://github.com/coreutils/coreutils/issues/375
2026-10-11 15:25:16 +01:00
Collin Funk 4e7ea3638c timeout: don't fail to build with non-Linux prctl implementations
Linux 2.1.57 introduced both prctl(2) and PR_SET_PDEATHSIG(2), so the
condition before this patch is correct there. However, other systems
have a prctl function but not PR_SET_PDEATHSIG, e.g., Irix and
SerenityOS.

* src/timeout.c (main): Check that PR_SET_PDEATHSIG is defined before
using it.
2026-10-10 21:44:39 -07:00