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

@danielgustafsson danielgustafsson commented Jun 28, 2021

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
Collaborator

@dfandrich dfandrich commented Jun 28, 2021

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.

bagder
bagder approved these changes Jun 29, 2021
@dfandrich
Copy link
Collaborator

@dfandrich dfandrich commented Aug 14, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants