mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
task/task_cancelpt: Kill the child if it is not in a cancel point
Do not allow a deferred cancellation if the group is exiting, it is too dangerous to allow the threads to execute any user space code after the exit has started. If the cancelled thread is not inside a cancellation point, just kill it immediately via asynchronous cancellation. This will create far less problems than allowing it to continue running user code.
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
#define GROUP_FLAG_NOCLDWAIT (1 << 0) /* Bit 0: Do not retain child exit status */
|
||||
#define GROUP_FLAG_PRIVILEGED (1 << 1) /* Bit 1: Group is privileged */
|
||||
#define GROUP_FLAG_DELETED (1 << 2) /* Bit 2: Group has been deleted but not yet freed */
|
||||
#define GROUP_FLAG_EXITING (1 << 3) /* Bit 3: Group exit is in progress */
|
||||
/* Bits 3-7: Available */
|
||||
|
||||
/* Values for struct child_status_s ch_flags */
|
||||
|
||||
Reference in New Issue
Block a user