oh icon indicating copy to clipboard operation
oh copied to clipboard

Adding `kill` built-in command in order to support job control.

Open brk0v opened this issue 3 years ago • 1 comments

Internal kill replaces jobs ids with the corresponding process group ids and executes kill binary.

For example:

kill %1       -> kill -- -123
kill %1 %3    -> kill -- -123 -154
kill -9 %1    -> kill -9 -123
kill -TERM %1 -> kill -TERM -123

Please, let me know if you want such or any changes. If yes, I'm ready to work on it and update this PR. If not, thank you for your work, I was learning how shells work and found your project. It helped me with understanding some internals.

brk0v avatar Jun 29 '22 15:06 brk0v

Looks great. Apologies for you having to wade through the code in job_unix which is still quite a mess. I should have some time this weekend to review this more thoroughly.

michaelmacinnis avatar Jun 30 '22 00:06 michaelmacinnis