Why some programs cannot receive the output of children processes?

0

Some programs don't display output of some children processes. As you can see is a screenshot,

I tried to run php --version in three console utilities: Git Bash (MinGw), native Windows 8 command line and Cygwin terminal.

The first two programs return information about version of PHP, but Cygwin does not print any output. However, Cygwin is not the only program that doesn't print console output of children processes. For example, qmake (the part of Qt Framework) also returns nothing in Cygwin when running qmake -query. As a consequence, I cannot use Qt Creator on my PC, because Qt Creator cannot parse output from qmake.

Any ideas how to solve this problem? Currently I use Windows 8 x64, but this problem also took place when I had Windows 7 x64 installed on my PC.

Serg

Posted 2014-01-10T19:38:10.167

Reputation: 3

Did you install PHP and Qmake via the Cygwin installer? I didn't know PHP was provided by Cygwin...

– DanteTheEgregore – 2014-01-10T21:24:14.900

No, these programs were installed using their native installers, but some native console Windows utilites like ipconfig, tracert, etc work fine in Cygwin. So I thought that Cygwin hasn't problems with running Windows applications in general, but only some applications work in Cygwin incorrectly. – Serg – 2014-01-11T16:06:23.527

Answers

0

You are mixing terms!

First screenshot is the same as second - it is a standard Windows console.

Third screenshot, in fact, is mintty emulator, but not a real console. See "min" in its name? Huge amount of applications can't be run in mintty at all!

I believe, the solution is to use proper console. Also, you may try ConEmu as advanced Windows terminal, it is "all propose and full-featured" (I'm the author).

As for QT creator... Try to use ProcessMonitor to find the problem. Yes, this is not quick and easy, but you may try. If it is working on the another PC you have, you may compare your logs. Also, may be some third-party tool install global hooks, which interferes normal behavior of piping. May be something else... Viruses or antiviruses, no?

Maximus

Posted 2014-01-10T19:38:10.167

Reputation: 19 395

Thanks for advice, I will try ConEmu. Also I just tried to write a Hello World application using Visual C++ 2012 and Cygwin didn't printed its output again. So Cygwin actually doesn't works good with some applications. However, the situation with Qt Creator still remains unclear: why Qt Creator cannot work with qmake.exe? It seems that Qt Creator tries to read a configuration from qmake, but receives an empty response. I suspect that the reason of this issue must be similar. Does Qt Creator use some tools for emulation of Unix? – Serg – 2014-01-11T16:28:46.090

Answer updated. Try ProcessMonitor? – Maximus – 2014-01-11T17:47:31.973

I didn't found any problems using ProcessMonitor. Also I tried diffenrent installation types of Qt like online/offline, x86/x64, and finally I found that the problem was in installation directory. Earlier I installed Qt to partition D and it didn't worked. Now I installed it to partition C and everything worked fine. Seems that this bug is related to Qt, but not to the system in general. In any case, thanks for help, the problem is solved! – Serg – 2014-01-12T14:54:47.117

0

As user Maximus suggested here before, the reason was Antivirus software. After I added Cygwin and Qt to exceptions list, both programs began to work properly.

Serg

Posted 2014-01-10T19:38:10.167

Reputation: 3