[PATCH 1 of 2] win32: spawndetached returns pid of detached process and not of cmd.exe

Simon Heimberg simohe at besonet.ch
Tue Feb 11 02:39:28 CST 2014



--On Montag, 10. Februar 2014 16:57 +0100 Mads Kiilerich 
<mads at kiilerich.com> wrote:
> On 02/10/2014 03:37 PM, Simon Heimberg wrote:
>> # HG changeset patch
>> # User Simon Heimberg <simohe at besonet.ch>
>> # Date 1391866507 -3600
>> #      Sat Feb 08 14:35:07 2014 +0100
>> # Node ID 1277051454b64dfd5b34d6fd8588f448be2ff47f
>> # Parent  12df27e151f1d72a180ab1e40222a9d88110e096
>> win32: spawndetached returns pid of detached process and not of cmd.exe
>>

<snip>

>
> (I agree that the ps test can be problematic. ps comes in completely
> different variants and for instance OS X do not have --no-heading.)

Indeed, it did break the test on OS X. I should probably have written an 
answer to [Patch 2 of 2] to prevent it from being applied. Or mention my 
concerns in the commit message itself?
I guess stripping the header with `grep -v PID` should work:
  $ ps -p `cat hg.pid` | grep -v PID

I will send a patch...

>
> /Mads
>
>> diff -r 12df27e151f1 -r 1277051454b6 mercurial/win32.py
>> --- a/mercurial/win32.py	Sat Feb 08 17:48:57 2014 +0100
>> +++ b/mercurial/win32.py	Sat Feb 08 14:35:07 2014 +0100
<snip>



More information about the Mercurial-devel mailing list