<div dir="ltr">As far as I can tell, the value of the return code is undocumented when you use Popen.terminate() on Windows.  I don't know what that means for the patch.  It's quite a bit more complicated than I anticipated based on the original thread to lldb-dev.  I thought it was just going to call Popen.terminate and assume that means it was a hard terminate.  I still don't grasp the need for all the complexity.<div><br></div><div>A few experiments on a throwaway program suggest that using Popen.terminate() sets returncode to 1, but there doesn't seem to be any guarantee that this is always the case.</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 28, 2015 at 11:53 AM Todd Fiala <<a href="mailto:todd.fiala@gmail.com">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tfiala added a comment.<br>
<br>
The "was_soft_terminate()" method is looking at the subprocess.Popen-like object's returncode and, judging by that, certifying that it was (or was not) a soft terminate that caused the exit.<br>
<br>
If you need the Popen-like object to figure that out (e.g. if you need to look at some of the Windows-extended Popen attributes), we can rearrange this to take the Popen-like object rather than only its returncode.  That would be totally fine.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D13124" rel="noreferrer" target="_blank">http://reviews.llvm.org/D13124</a><br>
<br>
<br>
<br>
</blockquote></div>