-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SEGFAULT in BMI when removing a port
There were 2 issues with the code: * The FD_CLR call had been moved after the memset of the bmi_port_t structure, which means that we were not clearing the file descriptor at all. * We should not close the file descriptor while the select call is on-going, it is undefined behavior. We introduce a socketpair so that the thread removing the port can notify the select thread and wait for an acknowledgement before closing the file descriptor.
- Loading branch information
1 parent
942a9ba
commit 5d25d0d
Showing
1 changed file
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters