aboutsummaryrefslogtreecommitdiffstats
path: root/src/operand2sig.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-02-20maint: fix sc_tight_scope failurePádraig Brady1-1/+1
This reverts commit 83fb600a21c6bad362b5739e7a9a9780639fa550.
2025-02-18maint: omit function defn externPaul Eggert1-1/+1
* src/chown-core.c, src/copy.c, src/cp-hash.c, src/csplit.c: * src/expand-common.c, src/find-mount-point.c, src/force-link.c: * src/group-list.c, src/iopoll.c, src/operand2sig.c: * src/show-date.c, src/wc_avx2.c: Omit unnecessary ‘extern ’ at the start of function defns. This is less wordy, makes it a bit easier to grep for issues such as the missing consistency checking in cksum.
2025-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2024-12-30maint: ISDIGIT → c_isdigitPaul Eggert1-1/+2
* gl/lib/strnumcmp-in.h (ISDIGIT): * src/system.h (ISDIGIT): Remove. All uses replaced by c_isdigit, with appropriate inclusions of c-ctype.h. This is more regular, and is more portable to existing (but unlikely) platforms where INT_MAX == UINT_MAX.
2024-03-13env,kill,timeout: support unnamed signalsGrisha Levit1-4/+4
Some signals with values less that the max signal number for the system do not have defined names. For example, currently on amd64 Linux, signals 32 and 33 do not have defined names, and Android has a wider gap of undefined names where it reserves some realtime signals. Previously the signal listing in env ended up reusing the name of the last printed valid signal (the repeated HUP below): $ env --list-signal-handling true HUP ( 1): IGNORE HUP (32): BLOCK HUP (38): IGNORE ..and the corresponding signal numbers were rejected as operands for the env, kill, and timeout commands. This patch removes the requirement that sig2str returns 0 for a signal number associated with an operand. This allows unnamed signals to be in the sets `env' attempts to manipulate when a --*-signal option is used with no argument, and kill(1) and timeout(1) to send such unnamed signals. * src/operand2sig.c (operand2sig): Drop signame argument, accept all signal numbers <= SIGNUM_BOUND. All callers updated. * src/env.c (parse_signal_action_params, reset_signal_handlers) (parse_block_signal_params, set_signal_proc_mask) (list_signal_handling): Accept all signal numbers <= SIGNUM_BOUND, use SIG%d for printing if necessary. * src/kill.c (list_signals, main): Likewise. (send_signals): Check errno from kill(3) for bad signo. * src/timeout.c (main): Update operand2sig call. * tests/misc/kill.sh: Test listing all signal numbers. * NEWS: Mention the improvement.
2024-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Manually update copyright year, until we fully sync with gnulib at a later stage. * tests/sample-test: Adjust to use the single most recent year.
2023-07-01maint: go back to using ‘error’Paul Eggert1-1/+0
Now that Gnulib’s ‘error’ module does proper static checking for not returning, we need no longer use the ‘die’ macro. This makes code easier to read for people that are used to ‘error’. * cfg.mk (error_fns, exclude_file_name_regexp): Remove ‘die’. (sc_die_EXIT_FAILURE): Remove. * src/die.h: Remove. All includes removed. All calls to ‘die’ changed back to calls to ‘error’. * src/install.c (get_ids): Use quoteaf (problem found with make syntax-check). * src/system.h: Include error.h, since some of our macros call ‘error’. Stop including error.h elsewhere.
2023-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Manually update copyright year, until we fully sync with gnulib at a later stage. * tests/sample-test: Adjust to use the single most recent year.
2022-09-18all: prefer HTTPS to HTTPStefan Kangas1-1/+1
* README-hacking: * README-prereq: * THANKS.in: * doc/sort-version.texi (Other version/natural sort implementations): * gl/lib/rand-isaac.c: * gl/tests/test-rand-isaac.c: * src/operand2sig.c (operand2sig): * src/remove.c (nonexistent_file_errno): * tests/misc/env-signal-handler.sh: * tests/misc/sort-debug-warn.sh (LC_ALL): Prefer HTTPS to HTTP. Addresses https://bugs.gnu.org/56512 Copyright-paperwork-exempt: yes
2022-01-02maint: update all copyright year number rangesPádraig Brady1-1/+1
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2021-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2020-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2019-01-01maint: update all copyright year number rangesAssaf Gordon1-1/+1
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2018-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2017-09-19all: prefer HTTPS in URLsPaul Eggert1-1/+1
2017-08-13kill: fix signal number to name lookup on AIXPádraig Brady1-2/+9
* src/operand2sig.c (operand2sig): AIX uses a different bit pattern in the returned status from the wait() functions and from shells. Therefore hardcode the selection of the lower bits of the number. * NEWS: Mention the fix.
2017-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2016-01-15tests: simplify invalid signal determination for kill -lPádraig Brady1-0/+11
* src/operand2sig.c (operand2sig): Add a detailed comment explaining why we validate even very large shell exit status values. * tests/misc/kill.sh: Add a test case for the ksh scheme. Simplify the INVALID signal number determination which also avoids a false failure on systems like FreeBSD 10 with incomplete signal list (caused by inaccurate NSIG).
2016-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2015-10-27all: quote string arguments in error messagesPádraig Brady1-1/+2
These strings are often file names or other user specified parameters, which can give confusing errors in the presence of unexpected characters for example. * cfg.mk (sc_error_quotes): A new syntax check rule. * src/*.c: Wrap error() string arguments with quote(). * tests/: Adjust accordingly. * NEWS: Mention the improvement.
2015-01-01maint: update all copyright year number rangesPádraig Brady1-1/+1
Run "make update-copyright" and then... * tests/sample-test: Adjust to use the single most recent year. * tests/du/bind-mount-dir-cycle-v2.sh: Fix case in copyright message, so that year is updated automatically in future.
2014-01-02maint: update all copyright year number rangesBernhard Voelker1-1/+1
Run "make update-copyright", but then also run this, perl -pi -e 's/2\d\d\d-//' tests/sample-test to make that one script use the single most recent year number.
2013-01-01maint: update all copyright year number rangesJim Meyering1-1/+1
Run "make update-copyright", but then also run this, perl -pi -e 's/2\d\d\d-//' tests/sample-test to make that one script use the single most recent year number.
2012-01-01maint: update all copyright year number rangesJim Meyering1-1/+1
Run "make update-copyright".
2011-01-01maint: update all copyright year number rangesJim Meyering1-1/+1
Run "make update-copyright".
2010-05-03maint: remove now-redundant definitions provided by sys/wait.hJim Meyering1-7/+0
* src/timeout.c (WIFSIGNALED, WTERMSIG): Remove definitions, now that gnulib guarantees they are defined in <sys/wait.h>. * src/operand2sig.c: Likewise. * src/kill.c: Likewise.
2010-04-24maint: remove now-unnecessary #if HAVE_header_H tests.Jim Meyering1-3/+1
* .x-sc_prohibit_always_true_header_tests: New file. * Makefile.am (syntax_check_exceptions): Add it. * src/cat.c: Remove #if HAVE_SYS_IOCTL_H test. * src/copy.c: Likewise. * src/ls.c: Likewise. * src/stty.c: Likewise. * src/install.c: Remove #if HAVE_SYS_WAIT_H test. * src/kill.c: Likewise. * src/operand2sig.c: Likewise. * src/timeout.c: Likewise. * src/pathchk.c: Remove #if HAVE_WCHAR_H test. * src/stat.c: Remove #if HAVE_NETINET_IN_H test.
2010-01-01maint: update all FSF copyright year lists to include 2010Jim Meyering1-1/+1
Use this command: git ls-files | grep -v COPYING \ | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \ build-aux/update-copyright
2009-02-28maint: remove an unnecessary inclusion of <signal.h>Jim Meyering1-2/+1
* src/operand2sig.c: Don't include <signal.h>.
2008-06-02new program: timeoutPádraig Brady1-0/+84
* AUTHORS: Register as the author. * NEWS: Mention this change. * README: Add timeout command to list. * src/timeout.c: New file. * src/kill.c (operand2sig): Move function to its own file, now that timeout.c will also use it. * src/operand2sig.c (operand2sig): New file, extracted from kill.c. * src/operand2sig.h (operand2sig): Declare. * src/Makefile.am (EXTRA_PROGRAMS): Add timeout. * src/.gitignore: Add timeout binary to list to ignore. * doc/coreutils.texi (timeout invocation): Add timeout info. (Signal specifications): New section, also referenced by kill. * man/Makefile.am (timeout.1): Add dependency. * man/timeout.x: New file. * po/POTFILES.in: Add timeout.c and operand2sig.c to list to translate. * tests/Makefile.am (TESTS): Add the two new tests. * tests/misc/help-version: Add support for new timeout command. * tests/misc/invalid-opt: Add support for new timeout command. * tests/misc/timeout: New file: check basic timeout operation. * tests/misc/timeout-parameters: New file: check invalid parameter combinations.