xiaoxiang781216 commented on code in PR #3333:
URL: https://github.com/apache/nuttx-apps/pull/3333#discussion_r2696713453
##########
examples/ipforward/ipforward.c:
##########
@@ -840,7 +840,12 @@ int main(int argc, FAR char *argv[])
/* Wait for receiver thread to terminate */
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
pthread_kill(fwd.if_receiver, 9);
+#else
+ pthread_cancel(fwd.if_receiver);
Review Comment:
something like this:
```
#ifndef CONFIG_ENABLE_ALL_SIGNALS
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
#endif
while (1)
{
#ifndef CONFIG_ENABLE_ALL_SIGNALS
pthread_testcancel();
#endif
```
--
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]