jlaitine commented on code in PR #19116:
URL: https://github.com/apache/nuttx/pull/19116#discussion_r3409387656
##########
libs/libc/pthread/pthread_kill.c:
##########
@@ -61,7 +67,25 @@
int pthread_kill(pthread_t thread, int signo)
{
- int ret = tkill((pid_t)thread, signo);
+ int ret;
+
+#ifdef CONFIG_DISABLE_ALL_SIGNALS
+ struct sched_param param;
Review Comment:
Right. I minimized this PR so that signo == 0 is checked directly in kernel
side nxsig_kill and nxsig_tgkill, preserve kill in syscall interface and
reverted changes to libc.
It is probably better to keep the signo == 0 check in the kernel - it might
belong in there anyways because the kernel is actually supposed to also check
if the caller is allowed to send signals to the target process (something
equivalent to linux check_kill_permission). This doesn't exist today, but still.
I did't want to put the check in nxsig_dispatch, because IMHO, that should
just dispatch whatever signal. kill and tgkill functionality with signo 0 are
really specific to how "kill" is specified.
Having separate tgkill and kill in the userspace-kernel interface seems
still redundant to me, but changing that is not required to get things working.
Perhaps there is some reason to keep both..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]