iceoryx
iceoryx copied to clipboard
The signal handler in examples may have undefined behavior
Required information
Some examples register a separate signal handler callback and operate on global objects in it. This can easily lead to undefined behavior. A signal can lead to a jump directly into the signal handler function from the middle of another function/method callback and then jump back to that call. When then the signal handler operates on such an object it is possible that the object is in an undefined state since an ongoing operation was interrupted.
We have to refactor those examples so that no global object is accessed which can be currently in use when the signal arises.
FYI: @elBoberido @FerdinandSpitzschnueffler did I forget anything?