void run() { size_t waited = 0; while (tru...
# general
s
void run() { size_t waited = 0; while (true) { if (interrupted()) { return; } std:this thread:sleep_for(std:chrono:milliseconds(200)); waited += 200; if (waited > FLAGS_alarm_timeout * 1000) { fflush(stdout); //==> FIX Initializer::shutdownNow(EXIT_CATASTROPHIC); } } }
v
If this is appropriate for a different channel, please let us know and we can move the conversation there. If it would be helpful
Subash could we link the files here, where we are proposing the change
s
Sure.
osquery\core\init.cpp
diff --git a/osquery/core/init.cpp b/osquery/core/init.cpp index 3b9c245c..3f82ecd8 100644 --- a/osquery/core/init.cpp +++ b/osquery/core/init.cpp @@ -684,6 +684,7 @@ class AlarmRunnable : public InterruptibleRunnable { std:this thread:sleep_for(std:chrono:milliseconds(200)); waited += 200; if (waited > FLAGS_alarm_timeout * 1000) { + fflush(stdout); Initializer::shutdownNow(EXIT_CATASTROPHIC); } }
v
Is this a better question for #windows channel
s
Given that there’s a suggested diff here, this is probably best in a github pull request.
You could file it in an issue if thats easier
s
Thanks
v
Hey Seph! great to e-meet you again
s
I thought that might be you Vivek! Nice to say hi. I’m still here, much the same. How’s Carbon Black treating you?
v
Pretty good, couldn't ask for more. It is a fun env!
s
Most we can hope for. That and growth oppertunities
v
So the open source contribution aspects for us is a little onerous given the corporate lay of the land around here
@Subash Rajaa has tried this patch internally and it works for the use case he outlined above. We are in a situation where we have to patch this one line every time we decide to upgrade the shipping version of osquery with our product
We are wondering if there might be a way to get this change into mainline
s
So your corporate makes it hard to sign off on a CLA? That makes it hard to accept patches 😐
Can y’all file issues or does that bump into corporate?
v
hmm.. filing issues would be ok I believe. Let me check on that
s
If you can file an issue, file it, and maybe don’t include the patch? (It should be fairly obvious from needing a flush) If you can’t, I’ll file it
v
Appreciate the help man. I will get back on this
s
Agree on getting it fixed. Now it’s just logistics 🙂
s
thanks gentlemen for the help. Will file the issue and notify.