mqtt-exec: SIGPIPE ignored
While debugging a BusyBox test suite failure on the builders @kdaudt and I discovered that mqtt-exec currently implicitly ignores SIGPIPE. This is due to the fact that mqtt-exec uses mosquitto and mosquitto ignores SIGPIPE on purpose to "prevent unnecessary client quits in threaded mode":
- https://github.com/eclipse/mosquitto/blob/d5970ca9985f4d3193fe7a359707723090bb13e9/lib/mosquitto.c#L112-L114
- https://github.com/eclipse/mosquitto/blob/d5970ca9985f4d3193fe7a359707723090bb13e9/src/mosquitto.c#L413
However, on the builders this causes the entire process hierarchy spawned by mqtt-exec to also ignore SIGPIPE (including abuild). This can then cause various test failures since many test suites expect SIGPIPE to cause program termination (behaviour of the default SIGPIPE handler).
The process hierarchy looks as follows:
└─ supervise-daemon mqtt-exec.aports-build --start --pidfile /run/mqtt-exec.aports-build/mqtt-exec.pid --user buildozer --stdout /dev/null --stderr /dev/null /usr/bin/mqtt-exec -- -h ms
└─ /usr/bin/mqtt-exec -h msg.alpinelinux.org -v -t git/aports/master -t git/aports/master/release --will-topic build/build-edge-x86_64 --will-retain -- /usr/bin/aports-build
└─ /bin/sh /usr/bin/aports-build git/aports/master {"head":"17c0f1dee6e35b42e2719a4d9cc955d290b27881","size":1,"gitlab":true,"repo":"alpine\/aports","ref":"refs\/heads\/master","u
├─ /bin/sh /usr/bin/aports-build git/aports/master {"head":"17c0f1dee6e35b42e2719a4d9cc955d290b27881","size":1,"gitlab":true,"repo":"alpine\/aports","ref":"refs\/heads\/master"
│ └─ /usr/bin/lua5.2 /usr/bin/buildrepo -p -l /var/cache/distfiles/buildlogs/build-edge-x86_64 main
│ └─ /bin/ash -e /usr/bin/abuild -r -m
│ └─ make -C /home/buildozer/aports/main/busybox/src/busybox-1.35.0 O=/home/buildozer/aports/main/busybox/src/build-dynamic V=1 check
│ └─ make -C /home/buildozer/aports/main/busybox/src/build-dynamic KBUILD_SRC=/home/buildozer/aports/main/busybox/src/busybox-1.35.0 KBUILD_EXTMOD= -f /home/buildozer
│ └─ /bin/sh /home/buildozer/aports/main/busybox/src/busybox-1.35.0/testsuite/runtest -v
│ └─ /bin/sh /home/buildozer/aports/main/busybox/src/build-dynamic/testsuite/md5sum.tests
│ └─ /bin/sh /home/buildozer/aports/main/busybox/src/build-dynamic/testsuite/md5sum.tests
│ └─ yes The quick brown fox jumps over the lazy dog
└─ /bin/sh /usr/bin/aports-build git/aports/master {"head":"17c0f1dee6e35b42e2719a4d9cc955d290b27881","size":1,"gitlab":true,"repo":"alpine\/aports","ref":"refs\/heads\/master"