Closed dspinellis closed 7 years ago
It's the first time we use dd. So no script was there to wrap it for negotiation.
``
``
Commit 228a3dc fixes this.
I had the same problem with
/usr/local/sgsh/bin/bash --sgsh -c '{{ echo a & echo b & }} | cat | {{ cat >1 & cat >2 & }}
This is why I tried dd.
OK, that's odd.
For me the reference script, which I copy-pasted it from above, runs perfectly fine and I didn't change a thing nor did I issue sudo make install
.
True. Maybe I run something else.
The following fails in the negotiation
[dds@stereo sgsh]$ /usr/local/sgsh/bin/bash --sgsh -c '{{ echo a & echo b & }} | ./sgsh-tee -p 1,2 2>tee.out | {{ cat >1 & cat >2 & }}'
[dds@stereo sgsh]$ tail -1 tee.out
sgsh-tee: sgsh negotiation failed with status code 4
This is because both cat
commands in the last multiple block are flexible while tee -p 1,2
provides precisely two output connections.
This topology is not solvable in the general case and therefore the negotiation terminates with an error.
The following graph however where dd
requires one connection and the other connection is left for cat
is perfectly valid:
/usr/local/sgsh/bin/bash --sgsh -c '{{ echo a & echo b & }} | ./sgsh-tee -p 1,2 2>tee.out | {{ dd of=1 & cat >2 & }}'
The following command hangs.