Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: "kill -STOP" as noticed in ksh93u+ gitlab



2024-02-27 18:04:34 -0800, Bart Schaefer:
[...]
> Changing the "kill" command doesn't (in zsh at least) affect the
> "suspend" command.
> 
> schaefer[592] Src/zsh -f -o login
> % suspend
> suspend: can't suspend login shell
> % suspend -f
> 
> zsh: suspended  Src/zsh -f -o login
> schaefer[593] fg
> [1]  + continued  Src/zsh -f -o login
> % kill -STOP $$
> kill: kill 605210 failed: operation not permitted
> %
[...]

I can't reproduce that on Ubuntu 22.04. The wording of that
error suggests it's the system blocking the kill() with EPERM.

> I think this is more to prevent accidental stoppage?

I'm still of the opinion that "kill pid" is low level enough an
interface to kill() that it should not be interfered with, but
that's not a strong opinion by any measure.

If we're blocking kill -s STOP $$, should we also block kill -s
STOP 0 and kill -s STOP -1?

-- 
Stephane




Messages sorted by: Reverse Date, Date, Thread, Author