Zend certified PHP/Magento developer

Delay to return the prompt control after executing “external” commands

I’m having some trouble to fix a strange behavior on my Machine.

Problem

Every time I run some “external” (not native) command on the window prompt there is some kind of a delay until the control is returned to me.

Command itself is executed normally and its output is promptly displayed. However, the cursor remains blinking for 2~5 seconds until the control is given back to me and I can execute new commands.

enter image description here

between the command output and get the

While working with GIT, I noticed some delay on every command and I run in the command prompt.

Observations

  • It is affecting all kind of shells: Cmd, Powershell, Cygwin, GitBash

  • It happens even with simple commands such as git status in a empty directory, git --version or java -version.

  • It does not happens if I start windows in SAFE MODE

  • Issue happens even when the Antivirus (Symantec) is disabled.

Process Monitor

I installed the Process Monitor and this is the output

16:37:09,5998830    git.exe 64492   Thread Exit
16:37:09,5999292    git.exe 64492   Thread Exit
16:37:09,5999680    git.exe 64492   Thread Exit
16:37:09,6000019    git.exe 64492   Thread Exit
16:37:11,6676766    git.exe 64492   RegOpenKey  HKLMSoftwareMicrosoftWindows NTCurrentVersionGRE_Initialize
16:37:11,6676991    git.exe 64492   RegQueryValue   HKLMSOFTWAREMicrosoftWindows NTCurrentVersionGRE_InitializeDisableMetaFiles
16:37:11,6677136    git.exe 64492   RegCloseKey HKLMSOFTWAREMicrosoftWindows NTCurrentVersionGRE_Initialize
16:37:11,6678039    git.exe 64492   RegCloseKey HKCUSoftwareClassesLocal SettingsSoftwareMicrosoft
16:37:11,6678144    git.exe 64492   RegCloseKey HKCUSoftwareClassesLocal Settings
16:37:11,6678268    git.exe 64492   RegCloseKey HKLMSOFTWAREMicrosoftOle
16:37:11,6678412    git.exe 64492   RegCloseKey HKLM
16:37:11,6680708    git.exe 64492   Thread Exit
16:37:11,6700179    git.exe 64492   Process Exit

On that log I can see a 2 seconds delay between the Thread Exit and the RegCloseKey. So, I guess the issue is around here… Something is inducing that delay between the Thread Exit and the Process Exit. This is also the same behavior when I run java -version.

Does anyone have any idea about what is happening or how I can fix this issue?