Improve supervisor signal handler safety

Now should only be making async-signal-safe calls
This commit is contained in:
Jon Siwek 2020-01-14 18:56:34 -08:00
parent 3e1a9ebec3
commit f5b3673890
4 changed files with 38 additions and 19 deletions

View file

@ -26,15 +26,19 @@ public:
/**
* Put the object in the "ready" state.
* @param signal_safe whether to skip error-reporting functionality that
* is not async-signal-safe
*/
void Fire();
void Fire(bool signal_safe = false);
/**
* Take the object out of the "ready" state.
* @param signal_safe whether to skip error-reporting functionality that
* is not async-signal-safe
* @return number of bytes read from the pipe, corresponds to the number
* of times Fire() was called.
*/
int Extinguish();
int Extinguish(bool signal_safe = false);
private:
Pipe pipe;