Skip to content

Commit 90a59f9

Browse files
committed
Synchronize the log writes
1 parent 69db5b9 commit 90a59f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ jobs:
6868
run: |
6969
cat >/usr/local/bin/wrapper1 <<'EOF'
7070
#!/bin/sh
71-
printf '%s %s\n' "$0" "$*" >>/var/log/wrapper1.log
71+
printf '%s %s\n' "$0" "$*" |
72+
flock /run/lock/wrapper1.fbd136bd-9b1b-448d-84a9-e18be53ae63c.lock \
73+
tee -a /var/log/wrapper1.log >/dev/null # TODO: Also log to terminal device?
7274
exec "$0.orig" "$@"
7375
EOF
7476
@@ -82,6 +84,7 @@ jobs:
8284
EOF
8385
8486
chmod +x /usr/local/bin/wrap1 /usr/local/bin/wrapper1
87+
mkdir /run/lock/wrapper1.fbd136bd-9b1b-448d-84a9-e18be53ae63c.lock
8588
8689
find /usr/lib/gcc \( -name cc1 -o -name cc1plus \) \
8790
-print -exec /usr/local/bin/wrap1 {} \;

0 commit comments

Comments
 (0)