Closed BenWiederhake closed 4 months ago
Had some time to look into this a bit this afternoon and may have found something interesting.
Looks like the error is coming from this code path: https://github.com/uutils/coreutils/blob/d63bc4a4e1774fffc22b5d376eca9eb8e615057d/src/uu/kill/src/kill.rs#L63-L65
Which propagates to the user as kill: Invalid input
that you noted above. I believe this is due to the fact that nix::Signal does not support SIGEXIT.
It looks like if signal: T ends up as None
in the nix kill function then it will do what we want: link. Although I am not sure how to do that yet, bit of a rust noob :)
Mocked up a potential solution here.
If others agree I can clean this up a bit and submit a PR.
I don't fully understand the reasoning, because SIGPOLL is also missing from the list, but running it show that it is treated correctly.
Your code looks good, please create a PR and let's move the discussion there :)
Closed by #6269
It seems that we somehow try to kill with signal 0. This should instead be a no-op. On Linux we don't do any
kill
-ish syscallso I assume that somehow it's libc handling this case and returning.EINVAL
, I guessFound while thinking about #6222.
EDIT: Note that GNU kill does the syscall, so it's probably not filtered/prevented by libc, I guess: