Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple hg.exe processes spawned #1035

Closed
raleighr3 opened this issue Jul 13, 2016 · 2 comments
Closed

multiple hg.exe processes spawned #1035

raleighr3 opened this issue Jul 13, 2016 · 2 comments

Comments

@raleighr3
Copy link

raleighr3 commented Jul 13, 2016

When in a directory that is a mercurial repo multiple hg.exe processes are started and never die.
Basically one hg.exe for each time the enter key is pressed

image

λ tasklist /FI "IMAGENAME eq hg.exe"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
hg.exe                        5028 Console                    1     25,928 K
hg.exe                        9756 Console                    1     25,912 K
hg.exe                       19012 Console                    1     25,928 K
hg.exe                       20340 Console                    1     25,860 K
hg.exe                       10948 Console                    1     25,928 K
hg.exe                       23844 Console                    1     25,924 K
hg.exe                       18152 Console                    1     25,916 K
hg.exe                       25432 Console                    1     25,924 K
hg.exe                       12736 Console                    1     25,924 K
hg.exe                       17372 Console                    1     25,924 K
hg.exe                       18380 Console                    1     25,924 K
hg.exe                        1340 Console                    1     25,924 K
hg.exe                       21764 Console                    1     25,924 K

To reproduce all I have to do is

  1. start Cmder
  2. change dir to a mercurial repo
  3. press enter several times

ConEmu build 160710

Clink v0.4.7 [git:dfc95a] Copyright (c) 2012-2016 Martin Ridgers
http://mridgers.github.io/clink

Usage: <verb_options>

Verbs:
inject Injects Clink into a process.
autorun Manage Clink's entry in cmd.exe's autorun.
set Adjust Clink's settings.
(' --help' for more details).

@raleighr3
Copy link
Author

Tried updating to latest mercurial (3.8.4), same results

hg --version
Mercurial Distributed SCM (version 3.8.1)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2016 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


hg --version
Mercurial Distributed SCM (version 3.8.4)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2016 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@raleighr3
Copy link
Author

Updated to 1.3.0 and still an issue, possible a bug in the lua runtime and/or parsing the output of hg.exe

modified clink.lua to the following and it resolved the issue

function get_hg_status()
    for line in io.popen("hg status -0"):lines() do
       return false
    end
    return true
end

process info:

C:\work\source\...\ (r_working)
λ WMIC  PROCESS WHERE name="hg.exe" get Caption,Commandline,Processid,ParentProcessId
Caption  CommandLine  ParentProcessId  ProcessId
hg.exe   hg  status   6100             6880
hg.exe   hg  status   12644            15136
hg.exe   hg  status   3912             11156
hg.exe   hg  status   14628            3264
hg.exe   hg  status   18352            3164
hg.exe   hg  status   12408            9888
hg.exe   hg  status   5540             13044
hg.exe   hg  status   17464            7984
hg.exe   hg  status   18072            16256
hg.exe   hg  status   16548            16596
hg.exe   hg  status   15104            16600


C:\work\source\...\ (r_working)
λ WMIC  PROCESS WHERE name="cmd.exe" get Caption,Commandline,Processid,ParentProcessId
Caption  CommandLine                                                                                      ParentProcessId  ProcessId
cmd.exe  "C:\Windows\system32\cmd.exe"  /k "C:\cmder\vendor\conemu-maximus5\..\init.bat"  17120            4716
cmd.exe  "C:\Windows\system32\cmd.exe"  /k "C:\cmder\vendor\conemu-maximus5\..\init.bat"  15648            13960
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            6100
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            12644
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            3912
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            14628
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            18352
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            12408
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            5540
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            17464
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            18072
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            16548
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            15104
cmd.exe  C:\Windows\system32\cmd.exe /c hg status                                                         13960            4428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant