Closed NickSampanis closed 8 years ago
Can one of the admins verify this patch? For more information see: https://github.com/rapid7/metasploit-payloads/wiki/CI-Testing
jenkins, this is ok to test
Thanks for this PR @NickSampanis, it looks good. Can we fallback on the Sleep()
option if the creation of the semaphore fails? I'm sure this will never happen, but it'd be nice to know that a fallback is in place that worked in the past will allow things to work? Cheers!
I told to @bcook-r7 at irc that there is a problem with alignment and he told that he will get it from here. The thing is that in my visual studio this code seems perfectly aligned :/ I could try fix it if you insist. About the semaphores, in my opinion if the creation of a semaphore fails. Something is going on with the memory allocation, so everything else might fail. Of course i/we could provide a simple if (hSem) before every semaphore function (and a else{sleep(500) in waitforsingleobject)
Thanks @NickSampanis, sorry I didn't see that conversation. I was just going through the "normal" review process :)
The reason it looks aligned in VS is because your tabs are set to 4 spaces.
I agree that allocation of the semaphore failing is an indication that things aren't good in general, but having a fallback in such scenarios would still be my preference. What do you think @bcook-r7 ?
I'd say that it's more likely that the whole process is close to dying if a semaphore cannot be allocated, and rather liked the change without the sleeps, TBH.
Instead of waiting with Sleep() for 500 ms. I implemented a semaphore which signals when the pipe has been created, as you have commented on todo. I tested the semaphores and they seem to work.