Shell data access (threading gdb debugging issues gcc7)

hi, this code was working solid for me under of0.8.x, ubuntu 14.04, gcc5.
now under ubuntu 18.04, gcc7, of1, threading issues occur, even after applying a Poco/FastMutex, and occasional *** Error in `./example-shell’: double free or corruption (out): 0x00005566b7930510 ***
Aborted (core dumped)

the purpose of this addon is to execute shell processes and capture the output. also to capture while long/endless procs are running (i.e., top, tcpdump, etc), keeping the data available for other events, like the sonification happening in the example.

from gdb is hard to debug as most times there is no stack available, just core dumps. seems like out of bounds access, and procs not being correctly shutdown… funny thing is this approach was working ok on older system, i could launch endless processes, stop them and launch others, now it seems endless procs like top are still executing while i call other stuff.

kinda hoping anyone with more threading / proc shell access experience could have some thoughts.

you can find the code here, & a sample vid there, thank you

got a chance to fix & became solid again, no more core dumps & fast stable proc switching, just missing proper termination of endless processes, they still linger around