commit ee0956cca3f5a2e8ea346336086e37296b3767d9
parent 2472ad09ad5d993096556543f2c5ce8f786223c1
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);
}