I have a multi-threaded application written in C that runs under Debian (Stretch). One of the threads is a simple console that supports several commands to control the application. Normally this application is started automatically when the system boots and runs in the background with the console thread disabled.
I am looking for a way to "connect" to the application remotely so that I can use the console. The connection could either be direct using a port or I can just ssh to the box and then connect to the app.
During development I just run the app interactively but would like the option to debug after it has already started.
I thought something like netcat might work but it seems to use TCP/IP ports whereas the console thread just connects to stdin/stdout.
Is there a way to accomplish this?