Cedric Blancher
2013-06-17 12:59:38 UTC
I found a bug in ksh93's kill(1) implementation: It doesn't check for
errors when kill(3p) and killpg(3p) are used.
However posix says for kill(3p) and killpg(3p):
RETURN VALUE
Upon successful completion, 0 shall be returned. Otherwise, -1
shall be returned and errno set to indicate the error.
ERRORS
The kill() function shall fail if:
EINVAL The value of the sig argument is an invalid or
unsupported signal number.
EPERM The process does not have permission to send the signal
to any receiving process.
ESRCH No process or process group can be found corresponding
to that specified by pid.
So the two syscalls can fail, and ksh93 kill(1) should check this.
Ced
errors when kill(3p) and killpg(3p) are used.
However posix says for kill(3p) and killpg(3p):
RETURN VALUE
Upon successful completion, 0 shall be returned. Otherwise, -1
shall be returned and errno set to indicate the error.
ERRORS
The kill() function shall fail if:
EINVAL The value of the sig argument is an invalid or
unsupported signal number.
EPERM The process does not have permission to send the signal
to any receiving process.
ESRCH No process or process group can be found corresponding
to that specified by pid.
So the two syscalls can fail, and ksh93 kill(1) should check this.
Ced
--
Cedric Blancher <cedric.blancher at googlemail.com>
Institute Pasteur
Cedric Blancher <cedric.blancher at googlemail.com>
Institute Pasteur