This looks like the worst way to do it though
Why not
A: have a flag to the command telling it you want json output?
B: put the actual file descriptor in the environment variable rather than a flag to look for a hardcoded one?
Why not
A: have a flag to the command telling it you want json output?
B: put the actual file descriptor in the environment variable rather than a flag to look for a hardcoded one?
“[…] if the environment variable STDDATA_FD is present or set to the descriptor to produce the JSON output on.”