jq
jq copied to clipboard
wip: feat: terminate jq immediately after the outgoing pipe closed
This should work. In reality, this does compile, but doesn't function when I actually try to emit SIGPIPE by doing:
cat | ./jq . | bash -c 'sleep 1; foo'
bash: foo: command not found
My understanding is that the missing command foo should immediately result in SIGPIPE on the jq command, so that
this feature terminates jq immediately.
I'd greatly appreciate it if anyone could share your insight on how I could make it actually work :pray:
Resolves #1691
Coverage decreased (-0.5%) to 84.48% when pulling da030b0c12e21cfd7bd4261dc2854b9992f21234 on mumoshu:quit-on-sigpipe into 90bc29c1b544c0436ec44246e180fdbb6d6384df on stedolan:master.
See also commentary in #1285.