From: Michal Sojka Date: Fri, 15 Dec 2017 11:57:04 +0000 (+0100) Subject: Implement exit command in command mode X-Git-Tag: 20171215~1 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/sojka/sterm.git/commitdiff_plain/f86ce2b47575a78a4ba064431bb327bb52f2e441 Implement exit command in command mode --- diff --git a/sterm.c b/sterm.c index 246bf68..e5bf7df 100644 --- a/sterm.c +++ b/sterm.c @@ -191,6 +191,8 @@ void handle_commands(int fd) CHECK(tcsendbreak(fd, num)); else if (strcmp(command, "go\n") == 0) break; + else if (strcmp(command, "exit\n") == 0) + exit(0); else { fprintf(stderr, "Unknown command: %s\n", command); exit(1); diff --git a/sterm.man b/sterm.man index ce4ea26..4c12108 100644 --- a/sterm.man +++ b/sterm.man @@ -93,6 +93,10 @@ section. Send break signal of given duration. See .BR tcsendbreak (3). .RE +.I exit +.RS +Exit sterm. +.RE .I go .RS Exit command mode and enter normal sterm operation.