mirror of
https://github.com/reactos/ccache.git
synced 2025-01-07 11:30:34 +00:00
Log executed command in the parent process to get correct PID in the message
This commit is contained in:
parent
a83c52e1ee
commit
cb2902b07a
10
execute.c
10
execute.c
@ -39,17 +39,17 @@ int execute(char **argv,
|
||||
pid_t pid;
|
||||
int status;
|
||||
|
||||
cc_log_executed_command(argv);
|
||||
if (getenv("CCACHE_VERBOSE")) {
|
||||
print_executed_command(stdout, argv);
|
||||
}
|
||||
|
||||
pid = fork();
|
||||
if (pid == -1) fatal("Failed to fork");
|
||||
|
||||
if (pid == 0) {
|
||||
int fd;
|
||||
|
||||
cc_log_executed_command(argv);
|
||||
if (getenv("CCACHE_VERBOSE")) {
|
||||
print_executed_command(stdout, argv);
|
||||
}
|
||||
|
||||
unlink(path_stdout);
|
||||
fd = open(path_stdout, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666);
|
||||
if (fd == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user