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

fix signal safety of _set_processing_status() #574

Open
jsiwek opened this issue Sep 12, 2019 · 0 comments

Comments

@jsiwek
Copy link
Member

commented Sep 12, 2019

The __set_processing_status() function may be called from sig_handler() and has potential uses of signal-unsafe fprintf() either directly, via safe_close() or via Reporter::Error().

First/easiest thing that comes to mind is to call write() directly instead of fprintf(), call close() instead of safe_close() (but do similar error handling that instead uses write()), and just drop the use of Reporter.

jsiwek referenced this issue Sep 12, 2019
set_processing_status can be called before reporter is initialized or
after it is deleted. Work around by sending data to stderr instead.

Patch by Thomas Petersen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.