dependabot[bot]
34d2d1d05e
build(deps): bump libc from 0.2.113 to 0.2.121
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.113 to 0.2.121.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.113...0.2.121 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 18:14:52 +00:00
Terts Diepraam
20212be4c8
fix clippy errors related to clap upgrade from 3.0.10 to 3.1.6
2022-03-17 22:46:56 +01:00
dependabot[bot]
59440d35c0
build(deps): bump clap from 3.0.10 to 3.1.6
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.0.10 to 3.1.6.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.0.10...v3.1.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 13:06:29 +00:00
Jeffrey Finkelstein
1aa6fd1468
timeout: fix bug in --preserve-status mode
...
Fix a bug where `timeout --preserve-status` was not correctly
preserving the status code of the child process if it timed out. When
that happens, the status code of the child process is considered to be
the signal number (in this case, `SIGTERM`). The exit status of
`timeout` is then 128 plus the numeric code associated with `SIGTERM`.
2022-03-12 19:53:11 -05:00
Jeffrey Finkelstein
2d390233fe
timeout: add ExitStatus enumeration
...
Add the `ExitStatus` enumeration in a new module `status.rs` to
contain all the magic numbers in the `timeout` utility.
2022-03-12 19:53:11 -05:00
Jeffrey Finkelstein
a0eed2405c
timeout: refactor helper func for wait-then-signal
...
Factor a helper function `wait_or_kill_process()` out of the main
`timeout()` function. This helper function contains the code to wait
for a child process and send the `SIGKILL` signal if it does not
terminate within a specified amount of time. This does not change the
function of `timeout`, just the organization of the code.
2022-03-11 18:47:30 -05:00
Sylvestre Ledru
9113594951
Merge pull request #3206 from 353fc443/timeout-empty-string
...
timeout: avoid panicking for empty string
2022-03-06 23:02:46 +01:00
Sylvestre Ledru
54a10e955a
Update of the cargo.lock url to point to the right branch
2022-03-06 22:13:17 +01:00
Davide Cavalca
19af43222b
Include license text in all published crates
2022-03-05 21:21:46 +01:00
353fc443
6951e18c41
timeout: avoid panicking for empty string
2022-03-05 14:36:24 +01:00
Terts Diepraam
53070141c1
all: add format_usage function ( #3139 )
...
This should correct the usage strings in both the `--help` and user documentation. Previously, sometimes the name of the utils did not show up correctly.
2022-02-21 17:14:03 +01:00
Daniel Eades
ba45fe312a
use 'Self' and derive 'Default' where possible
2022-01-30 15:08:26 +01:00
Daniel Eades
a2d5f06be4
remove needless pass by value
2022-01-30 15:08:26 +01:00
Terts Diepraam
eb82015b23
all: change macros
...
- Change the main! proc_macro to a bin! macro_rules macro.
- Reexport uucore_procs from uucore
- Make utils to not import uucore_procs directly
- Remove the `syn` dependency and don't parse proc_macro input (hopefully for faster compile times)
2022-01-29 15:26:32 +01:00
Terts Diepraam
9c8e865b55
all: enable infer long arguments in clap
2022-01-29 02:06:29 +01:00
Terts Diepraam
55a47f6fc0
Merge pull request #2863 from tertsdiepraam/clap-3
...
Clap 3
2022-01-20 23:14:52 +01:00
Roy Ivy III
2e251f91f1
0.0.12
2022-01-19 05:35:00 -06:00
Terts Diepraam
8872485922
Merge branch 'main' into clap-3
2022-01-17 13:25:51 +01:00
Sylvestre Ledru
1fbda8003c
coreutils 0.0.8 => 0.0.9, uucore_procs 0.0.7 => 0.0.8, uucore 0.0.10 => 0.0.11
2022-01-16 17:05:48 +01:00
Terts Diepraam
7318d1d24b
timeout: clap 3
2022-01-11 19:16:48 +01:00
Roy Ivy III
774e72551b
change ~ relax 'nix' version and remove 'nix' patch
...
- code coverage compilation on MacOS latest (MacOS-11+) now works with newer 'nix' versions
2022-01-09 18:57:25 -06:00
Jeffrey Finkelstein
cb92db322b
timeout: return UResult from uumain() function
2022-01-02 19:41:21 -05:00
Roy Ivy III
03e0cbb020
update 'nix' within workspace to force patched version
2021-11-19 17:55:03 -06:00
Roy Ivy III
f20aa49821
maint/CICD ~ (GHA) fix cargo-udeps
false positives (add 'ignore' exceptions to sub-crates)
2021-11-19 17:55:02 -06:00
Sylvestre Ledru
59e9870c56
Prepare version 0.0.8
2021-10-23 19:21:50 +02:00
Jan Verbeek
259f18fcab
Update message quoting and filename printing
2021-09-07 19:49:01 +02:00
Andreas Hartmann
1755195251
uu: Replace return_if_err
with crash_if_err
...
Unify the usage of macros `return_if_err` and `crash_if_err`. As
`return_if_err` is used only in `uumain` routines of utilities, it
achieves the same thing as `crash_if_err`, which calls the `crash!`
macro to terminate function execution immediately.
2021-08-25 13:59:39 +02:00
Michael Debertol
252220e9eb
refactor/uucore ~ make util_name and execution_phrase functions
...
Since util_name and execution_phrase no longer rely on features that are
only available to macros, they may as well be plain functions.
2021-08-14 17:55:18 +02:00
Roy Ivy III
c0854000d1
refactor ~ use execution_phrase!()
for usage messaging
2021-08-14 14:01:33 +02:00
Roy Ivy III
23b68d80ba
refactor ~ usage()
instead of get_usage()
2021-08-14 13:58:43 +02:00
Sylvestre Ledru
26a882551b
update the dep to uucore_procs 0.0.6
2021-07-11 21:04:11 +02:00
Sylvestre Ledru
1d8a66b7d3
Update to version 0.0.7
2021-07-11 18:04:56 +02:00
Michael Debertol
2ebca384c6
all utils: enable wrap_help
...
This makes clap wrap the help text according to the terminal width,
which improves readability for terminal widths < 120 chars,
because clap defaults to a width of 120 chars without this feature.
2021-06-27 16:17:10 +02:00
Michael Debertol
0531153fa6
uutils: move clap::App creation to separate functions
2021-06-25 21:23:45 +02:00
Rémi Lauzier
6aa79440f5
Fix a clippy warning
2021-06-20 21:21:50 -04:00
Michael Debertol
a69c2d52f9
Merge branch 'master' of https://github.com/uutils/coreutils into timeout/cmd-args
2021-06-12 13:14:16 +02:00
Jan Scheer
39f5f70f2b
Merge branch 'master' into refactoring_parse_size
2021-06-12 02:24:07 +02:00
Michael Debertol
f909751155
timeout: don't kill the process if -k is not set
...
`timeout` used to set the timeout to 0 when -k was not set. This
collided with the behavior of 0 timeouts, which disable the timeout.
When -k is not set the process should not be killed.
2021-06-11 20:44:25 +02:00
Michael Debertol
b4efd5a749
timeout: disable pre-existing SIGCHLD handlers
...
Needed to make a GNU test pass
2021-06-10 21:24:43 +02:00
Michael Debertol
0f9bc8e974
timeout: disable timeout if it is set to zero
2021-06-10 21:24:43 +02:00
Michael Debertol
8e0ed2d20e
timeout: support --verbose
2021-06-10 21:24:43 +02:00
Michael Debertol
ed646090c2
timeout: fix usage string
2021-06-10 17:03:39 +02:00
Michael Debertol
c5d7cbda32
timeout: handle arguments for the command to run
...
To prevent clap from parsing flags for the command to run as flags for
timeout, remove the "args" positional argument, but allow to pass flags
via the "command" positional arg.
2021-06-10 17:03:32 +02:00
Sylvestre Ledru
6d7d57e13c
remove a legacy declaration to getopt
2021-06-09 22:58:50 +02:00
Jan Scheer
be8650278b
Merge branch 'master' into refactoring_parse_size
2021-06-09 13:44:40 +02:00
Roy Ivy III
a8a2b3ec84
refactor/timeout ~ fix cargo clippy
complaint (clippy::needless_borrow)
2021-06-06 19:28:24 -05:00
Jan Scheer
130bf49e5d
Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size
2021-06-03 22:32:34 +02:00
Sylvestre Ledru
d8c06dd6bb
use clap::crate_version macro instead of the env variable
2021-06-02 19:00:19 +02:00
Jan Scheer
cc659c8572
Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size
2021-06-01 12:35:48 +02:00
Roy Ivy III
f6a079a77f
refactor/timeout ~ polish spelling (comments, names, and exceptions)
2021-05-31 08:23:57 -05:00