aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-15 17:51:29 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-15 17:51:29 +0200
commita66ff7a0d1ddde60051259a68009ea48bff1c412 (patch)
tree2dd4398442f52a911153c24ee9c98dca5cc3da3b
parent7ba2de9859296254b8cdbaf81aa8c27a2461e5d3 (diff)
Lock stderr when executing a commandHEADmaster
-rw-r--r--cbs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cbs.h b/cbs.h
index 0f8551c..b2ea314 100644
--- a/cbs.h
+++ b/cbs.h
@@ -288,7 +288,10 @@ foutdated(const char *src, char **deps, size_t n)
int
cmdexec(struct strs xs)
{
- return cmdwait(cmdexec_async(xs));
+ flockfile(stderr);
+ int ret = cmdwait(cmdexec_async(xs));
+ funlockfile(stderr);
+ return ret;
}
pid_t