Skip to content

Conversation

@crrodriguez
Copy link
Contributor

Signals handlers can only read/write to volatile sig_atomic_t variables or atomic lock-free ones.
Anything else results in undefined behaviour.

Signals handlers can only read/write to volatile sig_atomic_t variables
or atomic lock-free ones.
Anything else results in undefined behaviour.

Signed-off-by: Cristian Rodríguez <cristian@rodriguez.im>
@crrodriguez
Copy link
Contributor Author

checkpatch is wrong here because this is an special case ..

"the behavior is undefined if ...
...
is not a variable declared volatile sig_atomic_t..."

@mtkaczyk
Copy link
Member

@crrodriguez thanks for the fix.
Could you please tell us if there is any issue it is fixing? I'm missing this part in commit description.

@crrodriguez
Copy link
Contributor Author

It is just UB if you don't do this, that's all.

Copy link
Member

@mtkaczyk mtkaczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants