[cli][posix] allow Ctrl-D to exit (#2017)

This commit is contained in:
Buke Po
2017-07-20 22:13:49 -07:00
committed by Jonathan Hui
parent 791dd24d07
commit 2aa9830a07
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -897,7 +897,7 @@ exit:
#ifdef OPENTHREAD_EXAMPLES_POSIX
void Interpreter::ProcessExit(int argc, char *argv[])
{
exit(0);
exit(EXIT_SUCCESS);
OT_UNUSED_VARIABLE(argc);
OT_UNUSED_VARIABLE(argv);
}
+1
View File
@@ -107,6 +107,7 @@ void Uart::ReceiveTask(const uint8_t *aBuf, uint16_t aBufLength)
#ifdef OPENTHREAD_EXAMPLES_POSIX
case 0x04: // ASCII for Ctrl-D
case 0x03: // ASCII for Ctrl-C
exit(EXIT_SUCCESS);
break;