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
Stop if pipe has no data #27 #33
Conversation
notifier.cpp
Outdated
std::string subject; | ||
std::string data; | ||
std::string subject = ""; | ||
std::string data = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default constructor of std::string already do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing to say
notifier.cpp
Outdated
if (done) { | ||
if (msg->data.size()) { | ||
std::cerr << "WARNING! Pipe hasn't empty." << std::endl; | ||
done = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work because you clear done
flag. User send SIGTERM
signal, done
-flag was set in interrupt handler. In this line it was clear. How way user can stop the notifier if msg
has data?
No description provided.