Send the normal termination request to every permitted process whose name is worker.
Do not list PIDs individually.
Which command is appropriate?
The Linux psmisc killall command sends a signal to processes whose names match. Check permissions and platform-specific semantics.
Detailed explanation
pgrep workerIncorrect. pgrep prints matching PIDs but does not send a signal.
jobs workerIncorrect. jobs is limited to the current shell's job table.
kill workerIncorrect. kill expects PIDs or signal syntax, not a process name in this form.
killall workerCorrect. killall worker requests normal termination for matching processes.
Try it yourself
An example you can run in a temporary verification environment.
killall --help 2>&1 | headExpected result
psmisc killallのhelp。signalは送らないKey points
- killall
- Process name
- SIGTERM
Notes
- Environment: Linux psmisc系killall help
- Use a disposable process or test shell when checking lifecycle commands.
- Exact output and option names can vary slightly by distribution and tool version.
Foundation review
Place the operation
The psmisc killall semantics are platform-specific; another Unix implementation may use the name for a different purpose.
Check the side effect
List matching processes and confirm permissions before signaling a group with the same name.