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 kill and tgkill, preserve kill in syscall interfaced and reverted changes 
to libc.
   
   It is probably better to keep the signo == 0 in check kernel, it probably 
belongs in there anyways because the kerenel is actually supposed to also check 
if the caller is allowed to send signals to the target process. 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.
   



-- 
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]

Reply via email to