Skip to content
This repository has been archived by the owner. It is now read-only.

Linux guest: Add a delay when falling back to strace #1007

Closed
wants to merge 3 commits into from

Conversation

@drmn
Copy link

@drmn drmn commented Jul 13, 2016

It was needed for strace to catch sample execution correctly.

so that it can catch sample execution.
@jbremer
Copy link
Member

@jbremer jbremer commented Aug 17, 2016

Generally speaking I'd rather not have time.sleep() calls with arbitrary values. What about polling the filesize of the strace/straced file every second or so, and returning from the function once it's not zero anymore (i.e., strace has written something to it and thus is initialized)?

@drmn
Copy link
Author

@drmn drmn commented Sep 4, 2016

Thanks for your comment. I will try to improve it reflecting your input.

@jbremer
Copy link
Member

@jbremer jbremer commented Sep 23, 2016

Any luck @drmn? :-)

@drmn
Copy link
Author

@drmn drmn commented Oct 2, 2016

Apologies the delay—2nd try!

@jbremer
Copy link
Member

@jbremer jbremer commented Oct 2, 2016

Could you replace the try/catch approach with a if not os.path.exists(...): continue? Bit neater imo.

@drmn
Copy link
Author

@drmn drmn commented Oct 2, 2016

Thanks for your comment. Yes I agree and fixed, and noticed/fixed that previous code would loop without sleep until file generation.

@doomedraven
Copy link
Contributor

@doomedraven doomedraven commented May 12, 2017

this added to upcoming linux analyzer pr :)

@doomedraven
Copy link
Contributor

@doomedraven doomedraven commented May 12, 2017

your PR included here #1545 :)

@drmn
Copy link
Author

@drmn drmn commented Jun 1, 2017

Thank you—glad to see it :)

@drmn drmn closed this Jun 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants