by elFarto · 5y ago · 0 comments
foo | bar
STDOUT --> STDIN
ALTIN <-- ALTOUT
You could detected it by looking for specially number fd's open on program launch, or maybe an environment variable.What is you want to inspect the ALT flow? How do you code logic that concurrently reads and writes data without blocking, deadlocks or decent performance? What's the terminating condition? And is it necessary at all? Pipes describe transformation of data, bidirectional pipes imply the transformation of the agent/process itself, not only the data, which flows in one direction.
Make it two orders of magnitude more complex.
I mean, it's possible, but unidirectional pipes are much easier to grok and pretty excellent already.