Exiting gosdnc causes the input in cli to be invisble
Description
After exiting gosdnc
, there is the issue that all the follwing input in the original calling cli becomes invisible. Only calling a reset
fixes this issue at the moment. We can improve this by changing the way we quit inside gosdnc
. Instead of calling os.Exit(0)
we should make use of go channels or a context. os.Exit(0)
shuts down the application immediately without calling any defer
function, which makes this impossible to deal with at the moment. With the use of a channel or context, we can make use of a graceful shutdown method instead. Inside this shutdown we can handle the invisible input issue in the cli, for example like it is done here: Terminal does not display command after go-prompt exit
This might also allow to use Ctrl-C
to quit gosdnc
in prompt mode in addition to writing the exit
command.
Expected Behavior
Input in calling cli is visible after exiting gosdnc
.
Actual Behavior
Input in calling cli is invisible after exiting gosdnc
.
Possible Fix
See description.
Steps to Reproduce
- Call
gosdnc prompt
- Exit the application