I'm running a third party Java program on a VM instance on Google Compute Engine with Ubuntu 18.04.
I have an automated workflow that runs the Java program via SSH and executes my desired function. That all works perfectly fine but the problem I'm having is that when exiting the Java program with an exit or quit command, no new command line is opened which means the subsequent exit command is not implemented. It simply hangs indefinitely. It looks like the following:
shell:>quit
(new empty line here but should be user@project:~$)
The only way to open a new command line is to enter Ctrl + C i.e. ^C. Then entering exit closes the shell. But since this is intended to be an automated process that continues to the next stage in my workflow, it's no use if it can only be terminated with manual intervention. I've tried kill <pid> in the new empty line but that isn't effective. Any suggestions as to how I can close the shell with a command without having to use Ctrl + C would be most welcome.
I'm not an experienced programmer so I apologise for any incorrect terminology or lack of clarity.