dspinellis / dgsh

Shell supporting pipelines to and from multiple processes
http://www.spinellis.gr/sw/dgsh/
Other
323 stars 23 forks source link

Crash in nested dgsh execution #23

Closed dspinellis closed 7 years ago

dspinellis commented 7 years ago
$ dgsh -c 'dgsh -c "{{ echo hi & echo there & }}" | paste'
/home/dds/libexec/dgsh/bash: line 1: 16110 Done                    dgsh -c "{{ echo hi & echo there & }}"
     16111 Segmentation fault      (core dumped) | paste

The second command (e.g. paste or cat) crashes.

mfragkoulis commented 7 years ago

That's not very friendly whatever the cause. That said, the problem is that the inner dgsh is expected to negotiate, but it doesn't.

dgsh -c 'dgsh --dgsh-negotiate -c "{{ echo hi & echo there & }}" | paste' 2>err there hi

dspinellis commented 7 years ago

Excellent! I didn't know (or had forgotten about) that option. I added a note in the documentation.

mfragkoulis commented 7 years ago

The correct form is:

dgsh -c 'dgsh -c "{{ echo hi & echo there & }}" | paste'