diff --git a/minichlink/terminalhelp.h b/minichlink/terminalhelp.h
index 38cbcf16a89821974d37b5530a476629936b0fcc..65def667c71a13373300588aac93060c335223c7 100644
--- a/minichlink/terminalhelp.h
+++ b/minichlink/terminalhelp.h
@@ -96,6 +96,8 @@ static int ReadKBByte()
 
 static void CtrlC()
 {
+	fprintf( stderr, "Minichlink Closing\n" );
+	ResetKeyboardInput();
 	exit( 0 );
 }
 
@@ -105,6 +107,7 @@ static void CaptureKeyboardInput()
 	// Hook exit, because we want to re-enable keyboard.
 	atexit(ResetKeyboardInput);
 	signal(SIGINT, CtrlC);
+	signal(SIGPIPE, CtrlC);
 
 	struct termios term;
 	tcgetattr(0, &term);