Discussion:
stdout / stderr on cmd.exe
Florian Reinhard
2011-07-14 07:00:37 UTC
Permalink
Hi!

If one uses "make -j<n>" on cmd.exe one sees that stdout and stderr
are terribly messed up, which makes it impossible to identify compiler
error messages, or have an IDE parse the make output.

Is that a known issue and/or has somebody an idea how to fix this?

I've looked a bit into the code and tried to solve it with semaphores
when accessing stdout /stderr but i guess that's not the way it should
be?

Besides that if one would integrate Troy Runkels jobserver patch there
would be several subprocesses writing to stdout without having control
on when this would happen?

Regads,

F
Eli Zaretskii
2011-07-14 07:42:18 UTC
Permalink
Date: Thu, 14 Jul 2011 09:00:37 +0200
If one uses "make -j<n>" on cmd.exe one sees that stdout and stderr
are terribly messed up, which makes it impossible to identify compiler
error messages, or have an IDE parse the make output.
This is not specific to Windows. This is how Make works on all
Is that a known issue and/or has somebody an idea how to fix this?
It cannot be "fixed", because it isn't a bug. A new feature has been
discussed on bug-***@gnu.org some time ago that would remedy this,
but the proposed implementation of the solution is IMO not much better
than the problem, because it would essentially prevent you from seeing
the output of an entire recipe until that recipe finishes. That means
you are building blind, for those (important) use cases where recipes
are sub-Make invocations that run long commands.
I've looked a bit into the code and tried to solve it with semaphores
when accessing stdout /stderr but i guess that's not the way it should
be?
Semaphores or any similar solution will have the same problem as
mentioned above, because Make has no control on programs in a recipe
once it launches them.

Continue reading on narkive:
Search results for 'stdout / stderr on cmd.exe' (Questions and Answers)
6
replies
Program in C only opens for about a second?
started 2013-01-19 19:09:32 UTC
programming & design
Loading...