hi, well, i mean as first example around exec socat, not socats exec directive ( which i used for script tho )
but i dont remember the circumstances it was long ago like a phenomen lines of code appeared instead of files i think but i cant recall exactly it just, i removed exec it worked normally, otherwise code appeared .. dont mind as i cant recall or retry [new script somewhen soon] On Mon, Mar 15, 2021 at 10:51 AM felix <fe...@f-hauri.ch> wrote: > On Sat, Mar 13, 2021 at 01:05:32AM +0100, Alex fxmbsw7 Ratchev wrote: > > i have no example to write here as this was past long > Without sample, i'ts hard to represent your case! > > > the story was, i was coding a file server daemon, with socat, > Wow! > > > and i figured to use exec why not more exact more efficient > > Something like: > > -- In any terminal (first) > $ coproc socat TCP4-LISTEN:3333 STDIO > $ while read -u $COPROC foo;do echo $foo; echo $RANDOM > >&${COPROC[1]};done > > -- In another terminal > $ exec {netconn}<>/dev/tcp/localhost/3333 > $ echo >&$netconn foo ; read -u $netconn foo ; echo $foo > 24522 > $ echo >&$netconn bar ; read -u $netconn foo ; echo $foo > 29969 > > (while you will see in first terminal: > foo > bar > ) > > > but using it resulted sometimes output of code of the script in the > output > > of the files > > removing exec made it work normally as supposed > > Or are did you mean `EXEC` <address> of `socat`? > > -- Don't run this if you don't understand what you do! > socat TCP4-LISTEN:3333 EXEC:/bin/bash > > ?? > > -- > Félix > >