Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kill: support multiple signals for --list #6210

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Conversation

m-haisham
Copy link
Contributor

Issue #6202

Broken support for querying multiple signal names

$ ../gnu/src/kill --version | head -n1
kill (GNU coreutils) 9.5
$ ../gnu/src/kill -l SIGUSR1 SIGUSR2
10
12
$ cargo run --all-features kill -l SIGUSR1 SIGUSR2
10
$

Changes

Multiple signal input support for --list command

$ cargo run --all-features kill -l SIGUSR1 SIGUSR2
10
12

Don't terminate and display error inline when signal is not recognized

$ cargo run --all-features kill -l SIGUSR3 SIGUSR2
kill: unknown signal name 'SIGUSR3'
12

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, especially good catch regarding the continue-on-error behavior!

Please also write tests so that we don't regress in the future. (Eventually the argument parser will be rewritten, and it would be nice to know for sure that features like this didn't accidentally break.)

src/uu/kill/src/kill.rs Show resolved Hide resolved
@m-haisham
Copy link
Contributor Author

I have added necessary tests for multiple signals as well as to test for vertical list #6213

@cakebaker cakebaker linked an issue Apr 11, 2024 that may be closed by this pull request
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loogs good, and thank you for adding the test for vertical signals!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kill: test that we print signals vertically when using --list
2 participants