all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r100961: Enable ICANON (Bug#6771). Any long line problem must be solved differently.
Date: Thu, 05 Aug 2010 17:28:20 +0200	[thread overview]
Message-ID: <4C5AD894.1010501@swipnet.se> (raw)
In-Reply-To: <jwvk4o6gz4u.fsf-monnier+emacs@gnu.org>



Stefan Monnier skrev 2010-08-04 17.56:
> I agree with the commit that reverts my ICANON change.  Yet:
>
>> There is AFAIK no bug report or test case for the long line problem.
>
> AFAIK, the missing bug-report is the one that shows the ills of sending
> EOFs, while the bug-report for long-lines is bug#6149, which should be
> re-opened.

As I said in relation to this, I could not reproduce the error in 6149.  But 
AFAIK, this all depends on the underlying tty code, so a longer input string 
might trigger the error.  But if a line is longer than MAX_CANON, it will be 
truncated by the tty code.

>
>> +  /* There is no more "send eof to flush" going on (which is wrong and
>> +     unportable in itself), and disabling ICANON breaks a lot of stuff
>> +     and shows literal ^D in many cases.  The correct way to handle too
>> +     much output is to buffer what could not be written and then write it
>> +     again when select returns ok for writing.
>
> Could you spell out more precisely how it's different from what we do
> now: we already check emacs_write's output to see if the buffer is full,
> in which case we wait, don't we?

Yes, but we wait a small time and then try to write again (if I read the code 
correctly).  If nobody is reading, that can turn into a (sort of) busy wait.
The point of handing it off to select is then we don't write until we know we 
can write something.

>
>> +  s.main.c_lflag |= ICANON;	/* Enable line editing and eof processing */
>> +  s.main.c_cc[VEOF] = 'D'&037;	/* Control-D */
>>     s.main.c_cc[VMIN] = 1;
>>     s.main.c_cc[VTIME] = 0;
>
> IIUC VMIN and VTIME not only are specific to the non-ICANON mode, but
> also they use the same slot as some of the other settings (specifically
> the slots may be shared with VEOL and VEOF, according to my manpage).

That is correct.

	Jan D.




  reply	other threads:[~2010-08-05 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1OfpH8-0007OW-6n@internal.in.savannah.gnu.org>
2010-08-04 15:56 ` [Emacs-diffs] /srv/bzr/emacs/trunk r100961: Enable ICANON (Bug#6771). Any long line problem must be solved differently Stefan Monnier
2010-08-05 15:28   ` Jan Djärv [this message]
2010-08-06 13:03     ` Stefan Monnier
2010-08-06 14:30       ` Jan Djärv
2010-08-06 17:12         ` Jan Djärv

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=4C5AD894.1010501@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.