mirror of
https://github.com/mirror/make.git
synced 2025-03-26 01:30:31 +08:00
* job.c (child_execute_job): Fix $(shell...) under NO_OUTPUT_SYNC.
* main.c (decode_output_sync_flags): Use NONE for NO_OUTPUT_SYNC.
This commit is contained in:
parent
65c447289e
commit
8b54c5cff9
8
job.c
8
job.c
@ -2026,8 +2026,7 @@ child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
|||||||
int save_fdout = -1;
|
int save_fdout = -1;
|
||||||
int save_fderr = -1;
|
int save_fderr = -1;
|
||||||
|
|
||||||
#ifndef NO_OUTPUT_SYNC
|
/* Divert child output if we want to capture output. */
|
||||||
/* Divert child output if output_sync in use. */
|
|
||||||
if (out && out->syncout)
|
if (out && out->syncout)
|
||||||
{
|
{
|
||||||
if (out->out >= 0)
|
if (out->out >= 0)
|
||||||
@ -2035,7 +2034,6 @@ child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
|||||||
if (out->err >= 0)
|
if (out->err >= 0)
|
||||||
fderr = out->err;
|
fderr = out->err;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* For each FD which needs to be redirected first make a dup of the standard
|
/* For each FD which needs to be redirected first make a dup of the standard
|
||||||
FD to save and mark it close on exec so our child won't see it. Then
|
FD to save and mark it close on exec so our child won't see it. Then
|
||||||
@ -2124,8 +2122,7 @@ child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
|||||||
int fdout = FD_STDOUT;
|
int fdout = FD_STDOUT;
|
||||||
int fderr = FD_STDERR;
|
int fderr = FD_STDERR;
|
||||||
|
|
||||||
#ifndef NO_OUTPUT_SYNC
|
/* Divert child output if we want to capture it. */
|
||||||
/* Divert child output if output_sync in use. */
|
|
||||||
if (out && out->syncout)
|
if (out && out->syncout)
|
||||||
{
|
{
|
||||||
if (out->out >= 0)
|
if (out->out >= 0)
|
||||||
@ -2133,7 +2130,6 @@ child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
|||||||
if (out->err >= 0)
|
if (out->err >= 0)
|
||||||
fderr = out->err;
|
fderr = out->err;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
pid = vfork();
|
pid = vfork();
|
||||||
if (pid != 0)
|
if (pid != 0)
|
||||||
|
4
main.c
4
main.c
@ -795,6 +795,9 @@ decode_debug_flags (void)
|
|||||||
static void
|
static void
|
||||||
decode_output_sync_flags (void)
|
decode_output_sync_flags (void)
|
||||||
{
|
{
|
||||||
|
#ifdef NO_OUTPUT_SYNC
|
||||||
|
output_sync = OUTPUT_SYNC_NONE;
|
||||||
|
#else
|
||||||
if (output_sync_option)
|
if (output_sync_option)
|
||||||
{
|
{
|
||||||
if (streq (output_sync_option, "none"))
|
if (streq (output_sync_option, "none"))
|
||||||
@ -812,6 +815,7 @@ decode_output_sync_flags (void)
|
|||||||
|
|
||||||
if (sync_mutex)
|
if (sync_mutex)
|
||||||
RECORD_SYNC_MUTEX (sync_mutex);
|
RECORD_SYNC_MUTEX (sync_mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
|
2
output.c
2
output.c
@ -344,7 +344,7 @@ setup_tmpfile (struct output *out)
|
|||||||
/* If we failed to create a temp file, disable output sync going forward. */
|
/* If we failed to create a temp file, disable output sync going forward. */
|
||||||
error:
|
error:
|
||||||
output_close (out);
|
output_close (out);
|
||||||
output_sync = 0;
|
output_sync = OUTPUT_SYNC_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Synchronize the output of jobs in -j mode to keep the results of
|
/* Synchronize the output of jobs in -j mode to keep the results of
|
||||||
|
Loading…
Reference in New Issue
Block a user