Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-08 Thread Wang YanQing
On Wed, May 08, 2013 at 02:32:23PM -0400, Peter Hurley wrote: > Perhaps you misunderstood. The snippet above does indeed restart > a tty which has been stopped via STOP_CHAR(tty) and the termios > IXON flag cleared. Thanks Peter, I get your meaning, and I think your suggestion is right, not only b

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-08 Thread Peter Hurley
On 05/08/2013 01:12 PM, Wang YanQing wrote: On Wed, May 08, 2013 at 11:18:07AM -0400, Peter Hurley wrote: On 05/08/2013 09:16 AM, Wang YanQing wrote: On Tue, May 07, 2013 at 07:02:00PM -0700, Greg KH wrote: What about Peter's comments on this patch? Peter's comments will import policy, I me

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-08 Thread Wang YanQing
On Wed, May 08, 2013 at 11:18:07AM -0400, Peter Hurley wrote: > On 05/08/2013 09:16 AM, Wang YanQing wrote: > > On Tue, May 07, 2013 at 07:02:00PM -0700, Greg KH wrote: > >> What about Peter's comments on this patch? > >> > > Peter's comments will import policy, > > > > I means we should let usersp

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-08 Thread Peter Hurley
On 05/08/2013 09:16 AM, Wang YanQing wrote: On Tue, May 07, 2013 at 07:02:00PM -0700, Greg KH wrote: What about Peter's comments on this patch? Peter's comments will import policy, I means we should let userspace to decide whether and when to restart tty with the mechanism of TCXONC instead o

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-08 Thread Wang YanQing
On Tue, May 07, 2013 at 07:02:00PM -0700, Greg KH wrote: > What about Peter's comments on this patch? > Peter's comments will import policy, I means we should let userspace to decide whether and when to restart tty with the mechanism of TCXONC instead of restart tty accidental when make n_tty_set

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-07 Thread Greg KH
On Wed, May 08, 2013 at 09:55:45AM +0800, Wang YanQing wrote: > On Tue, May 07, 2013 at 11:58:00AM -0700, Greg KH wrote: > > On Wed, May 08, 2013 at 02:47:34AM +0800, Wang YanQing wrote: > > > The reason is before emacs takeover control the tty, > > > we use CTRL-S to XOFF it. Then when emacs takeo

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-07 Thread Wang YanQing
On Tue, May 07, 2013 at 04:50:05PM -0400, Peter Hurley wrote: > This should be fixed in n_tty_set_termios() instead of fixing userspace > workarounds. Sorry, I misuse the word "workaround", emacs just do the right thing I think. But your suggestion maybe import policy. > The problem occurs when t

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-07 Thread Wang YanQing
On Tue, May 07, 2013 at 11:58:00AM -0700, Greg KH wrote: > On Wed, May 08, 2013 at 02:47:34AM +0800, Wang YanQing wrote: > > The reason is before emacs takeover control the tty, > > we use CTRL-S to XOFF it. Then when emacs takeover the > > control, it may don't use the flow-control, so emacs hang.

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-07 Thread Peter Hurley
On 05/07/2013 02:47 PM, Wang YanQing wrote: I meet emacs hang in start if I do the operation below: 1: echo 3 > /proc/sys/vm/drop_caches 2: emacs BigFile 3: Press CTRL-S follow 2 immediately Then emacs hang on, CTRL-Q can't resume, the terminal hang on, you can do nothing with this term

Re: [PATCH]TTY: Fix tty can't be restarted by TCXONC ioctl request

2013-05-07 Thread Greg KH
On Wed, May 08, 2013 at 02:47:34AM +0800, Wang YanQing wrote: > I meet emacs hang in start if I do the operation below: > 1: echo 3 > /proc/sys/vm/drop_caches > 2: emacs BigFile > 3: Press CTRL-S follow 2 immediately > > Then emacs hang on, CTRL-Q can't resume, the terminal > hang on, you ca