netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Leblond <eric@regit.org>
To: netfilter-devel@vger.kernel.org
Cc: Eric Leblond <eric@regit.org>
Subject: [nftables PATCH 5/5] cli: reset terminal when CTRL+d is pressed
Date: Sun,  2 Jun 2013 12:38:32 +0200	[thread overview]
Message-ID: <1370169512-23500-6-git-send-email-eric@regit.org> (raw)
In-Reply-To: <1370169512-23500-1-git-send-email-eric@regit.org>

The terminal was not correctly resetted when CTRL+d was pressed.
The result was that reset has to be called from shell after exit.

Signed-off-by: Eric Leblond <eric@regit.org>
---
 src/cli.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/cli.c b/src/cli.c
index 541c26c..8875207 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -90,8 +90,11 @@ static void cli_complete(char *line)
 	LIST_HEAD(msgs);
 
 	line = cli_append_multiline(line);
-	if (line == NULL)
+	if (line == NULL) {
+		printf("\n");
+		cli_exit();
 		return;
+	}
 
 	for (c = line; *c != '\0'; c++)
 		if (!isspace(*c))
-- 
1.7.10.4


  parent reply	other threads:[~2013-06-02 10:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 10:38 [nftables PATCH 0/5] misc fixes Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 1/5] doc: fix inversion of operator and object Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 2/5] expression: don't free TYPE_INVALID datatype Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 3/5] rule: list elements in set in any case Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 4/5] cli: add quit command Eric Leblond
2013-06-02 10:38 ` Eric Leblond [this message]
2013-06-06 11:43 ` [nftables PATCH 0/5] misc fixes Pablo Neira Ayuso
2013-06-06 12:02   ` Pablo Neira Ayuso
2013-06-08 10:12     ` Eric Leblond

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370169512-23500-6-git-send-email-eric@regit.org \
    --to=eric@regit.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).