Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: Simplify signal handler #7310

Closed

Conversation

danielgustafsson
Copy link
Member

The signal handler registered for SIGINT is only handling SIGINT
so there isn't much need for inspecting the signo. While there,
rename the handler to be more specific.

g_should_exit should really be of sig_atomic_t type, but relying
on autoconf in the examples seems like a bad idea so keep tjat
for now.

Closes #xxxx

The signal handler registered for SIGINT is only handling SIGINT
so there isn't much need for inspecting the signo.  While there,
rename the handler to be more specific.

g_should_exit should really be of sig_atomic_t type, but relying
on autoconf in the examples seems like a bad idea so keep tjat
for now.

Closes #xxxx
@dfandrich
Copy link
Contributor

I've just discovered that sig_atomic_t is part of C89, so you should be able to use that type here unconditionally. Examples aren't intended to be as fully portable as the rest of curl, anyway. It also means that I can just submit PR#7309 because there's no need to check if that type is available because it will be.

@danielgustafsson danielgustafsson added the feature-window A merge of this requires an open feature window label Jul 7, 2021
@bagder bagder closed this in 39de263 Aug 13, 2021
@dfandrich
Copy link
Contributor

dfandrich commented Aug 14, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation feature-window A merge of this requires an open feature window
Development

Successfully merging this pull request may close these issues.

None yet

4 participants