An existing command line C application has to be extended.
The program offers a shell to execute commands. One of these commands is a listener.
When the listener runs, no shell access is possible anymore.
Multi-threading is wanted so that one thread cares for the listener and the other takes care of the shell command interpreter.
The listener should run in the background while the user still can type in commands into the shell.