anchao commented on PR #17352: URL: https://github.com/apache/nuttx/pull/17352#issuecomment-3570960711
> > To reiterate, the current implementation of signals is highly unsafe because it borrows the context of the interrupted thread in its delivery logic. If a lock is held in the signal context, a serious bug will occur, which is why we prohibit the use of signals. > > Signal just like a software interrupt, which has many limitation similar with you can't do many thing in hardware interrupt. Spec has the dedicadated page declare which you can do and can't do in the signal handle: https://man7.org/linux/man-pages/man7/signal-safety.7.html https://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html But our system does not follow this standard, especially VFS. On our real device, there was a bug caused by a POSIX library using read/write interfaces in the signal context, resulting in a deadlock, I merely wish to state that there is still a long way to go, which, of course, is irrelevant to the current topic. -- 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]
