lkml.org 
[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tty: Fix tcdrain hang due to tty chars_in_buffer errors
On Fri, 17 Jul 2009 11:07:54 -0400
Jeff Harris <jeff_harris@kentrox.com> wrote:

> If a tty driver's chars_in_buffer callback reports an error, the wait loop in

chars_in_buffer cannot report an error. It reports how many characters
are in the buffer.

> A process calling tcdrain will block indefinitely if it calls tcdrain when the
> device is disconnected.

Fix your chars_in_buffer. On a disconnect its quite reasonable to return
0, as they are not buffered any more.

Alan


\
 
 \ /
  Last update: 2009-07-17 18:03    [W:0.028 / U:9.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site