public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Kendall <wkendall@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsdump: handle Ctrl-D during prompts
Date: Thu, 10 Nov 2011 10:39:42 -0600	[thread overview]
Message-ID: <4EBBFE4E.6050900@sgi.com> (raw)
In-Reply-To: <20111110083113.GA10573@infradead.org>

Christoph Hellwig wrote:
> On Wed, Nov 09, 2011 at 04:15:46PM -0600, Bill Kendall wrote:
>> xfsdump does not currently handle Ctrl-D well during a dialog
>> prompt. If some text is entered followed by Ctrl-D, an assert
>> will trip because xfsdump expects a new-line character at the
>> end of the user's input (or if asserts are disabled, the last
>> character the user entered will be dropped).
>>
>> If Ctrl-D is entered without entering any response, some dialog
>> callers (e.g., tree_subtree_inter()) will abort because they
>> receive an unexpected response code.
>>
>> This patch changes xfsdump to treat Ctrl-D as if the user hit
>> enter. User input (if any) will be passed back to the caller,
>> and a new line will be echoed to the terminal.
> 
> Shouldn't Ctrl+D cause us to ignore the input that was added
> before?  That's what I would expect from command line applications.

Ctrl-C will behave the way you describe.

I tried a some interactive programs (parted, python, sftp, bash,
xfs_db), and Ctrl-D seems to be ignored if there's already some input.
I'll rework the patch to behave this way unless I hear back from
you.

Thanks,
Bill

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2011-11-10 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 22:15 [PATCH] xfsdump: handle Ctrl-D during prompts Bill Kendall
2011-11-10  8:31 ` Christoph Hellwig
2011-11-10 16:39   ` Bill Kendall [this message]

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=4EBBFE4E.6050900@sgi.com \
    --to=wkendall@sgi.com \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.com \
    /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