commit 65e1c7b1c0dff595d7acdaf418dc2a375070b37a
parent 694e18ec4918bc6bd980e6c0dd6659380c5c2ad6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 31 Oct 2021 05:10:10 +0100
driver/posix: Print full path to the tool
Having the full path to the executed tool makes much
easier to reproduce problems in the spawed tools
because you can just copy paste the line and execute
it.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cmd/cc/posix/cc.c b/src/cmd/cc/posix/cc.c
@@ -337,7 +337,8 @@ spawn(int tool)
if (!dflag && tool != CC1 && tool != LD)
dup2(devnullfd, 2);
if (dflag) {
- for (ap = t->args.s; *ap; ap++)
+ fprintf(stderr, "%s", t->cmd);
+ for (ap = t->args.s+1; *ap; ap++)
fprintf(stderr, " %s", *ap);
putc('\n', stderr);
}