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

psh: reimplement 'kill' command #215

Merged
merged 1 commit into from
Feb 26, 2024
Merged

psh: reimplement 'kill' command #215

merged 1 commit into from
Feb 26, 2024

Conversation

gerard5
Copy link
Contributor

@gerard5 gerard5 commented Jan 31, 2024

The commit with the title "WIP" will be removed, its purpose is to point out differences from the CI unit test.

Description

The purpose of this change is to implement the kill command to accept a POSIX-compliant signal number or signal name, which then can be sent to one or more processes.

The default signal for kill is TERM.

Usage: kill [-s signal | -signal] <pid [...]>

Usage examples

send the default TERM signal to pids 14 15 20
(psh)% kill 14 15 20

Send a KILL signal (this was the behavior of the previous implementation of psh kill command)
(psh)% kill -SIGKILL 10
or
(psh)% kill -KILL 10
or
(psh)% kill -9 10

Some other examples
(psh)% kill -SIGHUP 8

(psh)% kill -s SIGQUIT 9 10 11

Motivation and Context

Sending signals to processes like SIGUSR1, SIGQUIT, SIGHUP.. not just single signal_kill.

JIRA: RTOS-760

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: ia32-generic, imxrt1176-evk, imxrt1064-g3evk, stm32l4a6-nucleo.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

Copy link

github-actions bot commented Jan 31, 2024

Unit Test Results

7 155 tests  +737   6 448 ✅ +661   34m 7s ⏱️ +54s
  397 suites + 35     707 💤 + 77 
    1 files   ±  0       0 ❌  -   1 

Results for commit 4ae0f1e. ± Comparison against base commit cdd944d.

This pull request skips 4 and un-skips 8 tests.
phoenix-rtos-tests/mem/mprotect-fault ‑ armv7a7-imx6ull-evk:phoenix-rtos-tests/mem/mprotect-fault
phoenix-rtos-tests/mem/mprotect-fault ‑ armv7a9-zynq7000-qemu:phoenix-rtos-tests/mem/mprotect-fault
phoenix-rtos-tests/mem/mprotect-fault ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/mem/mprotect-fault
phoenix-rtos-tests/mem/mprotect-fault ‑ ia32-generic-qemu:phoenix-rtos-tests/mem/mprotect-fault
phoenix-rtos-tests/libc/misc ‑ armv7a7-imx6ull-evk:phoenix-rtos-tests/libc/misc.stat_mode.fifo_type
phoenix-rtos-tests/libc/misc ‑ armv7a9-zynq7000-qemu:phoenix-rtos-tests/libc/misc.stat_mode.fifo_type
phoenix-rtos-tests/libc/misc ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/libc/misc.stat_mode.fifo_type
phoenix-rtos-tests/libc/misc ‑ armv7m4-stm32l4x6-nucleo:phoenix-rtos-tests/libc/misc.unistd_file.file_lseek_espipe
phoenix-rtos-tests/libc/misc ‑ armv7m4-stm32l4x6-nucleo:phoenix-rtos-tests/libc/misc.unistd_file.file_readwrite_pipe
phoenix-rtos-tests/libc/misc ‑ armv7m7-imxrt106x-evk:phoenix-rtos-tests/libc/misc.stat_mode.fifo_type
phoenix-rtos-tests/libc/misc ‑ armv7m7-imxrt117x-evk:phoenix-rtos-tests/libc/misc.stat_mode.fifo_type
phoenix-rtos-tests/libc/misc ‑ ia32-generic-qemu:phoenix-rtos-tests/libc/misc.stat_mode.fifo_type

♻️ This comment has been updated with latest results.

@gerard5 gerard5 force-pushed the gerard5/RTOS-760 branch 17 times, most recently from 75a31b2 to ca8b829 Compare February 1, 2024 17:23
The purpose of this change is to implement the `kill` command to
accept a POSIX-compliant signal number or signal name, which then
can be sent to one or more processes.

JIRA: RTOS-760
@gerard5 gerard5 marked this pull request as ready for review February 26, 2024 15:46
@gerard5 gerard5 merged commit ad86483 into master Feb 26, 2024
30 checks passed
@gerard5 gerard5 deleted the gerard5/RTOS-760 branch February 26, 2024 20:41
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.

2 participants