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

a copy-paste bug in UnixSignalWatcherPrivate::watchForSignal #2

Open
zmiiGorinich opened this issue Sep 28, 2016 · 0 comments
Open

Comments

@zmiiGorinich
Copy link

Thanks for a great piece of code!
There is only couple of problems:

  1. You seem to forget to copy the sa_flags=0 initialization from the Qt example.
    In my case it leads to not restoring the handler after the first call, time to time.
  2. I am not sure why did Qt people use sigemptyset in the original example.
    Possibly, they wanted to add the signals later with sigaddset, but forgot about it.
    Anyway, now your handler is not protected from any signal to arrive during its
    execution. I doubt it's the desired effect.
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

No branches or pull requests

1 participant