xiaoxiang781216 commented on code in PR #17359:
URL: https://github.com/apache/nuttx/pull/17359#discussion_r2549184925


##########
fs/vfs/fs_signalfd.c:
##########
@@ -149,7 +149,7 @@ static int signalfd_file_close(FAR struct file *filep)
 
   for (signo = MIN_SIGNO; signo <= MAX_SIGNO; signo++)
     {
-      if (nxsig_ismember(&dev->sigmask, signo))
+      if (nxsig_ismember(&dev->sigmask, signo) == 1)

Review Comment:
   > I think `nxsig_ismember()` is intended to implement the POSIX API` 
sigismember()`.
   > 
   > According to` sigismember()`, a return value of 1 means the specified 
signal is a member of the set, and 0 means it is not.
   > 
   
   yes, it's correct to ensure sigismember return 1 if the signal number is 
part of siganl set to compliant with POSIX spec.
   
   > In addition, `group_signal_handler(`) also checks for `== 1`.
   > 
   > I changed here because I think these usages should be consistent.
   > 
   > Maybe I should not change here and go to update `group_signal_handler() 
`to not use `==1`?
   > 
   
   Yes, since it's more robust and consiste with other check point.



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