This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] to_slave pipe is full fix
On Mon, Dec 16, 2002 at 01:15:54PM -0600, Steve O wrote:
>On Mon, Dec 16, 2002 at 05:01:22PM +0100, Corinna Vinschen wrote:
>> did you perhaps forgot to attach the patch?
>
>My apologies, the patch is enclosed this time.
>-steve
>
>ChangeLog:
>2002-12-15 Steve Osborn <bub@io.com>
>
> * fhandler_termios.cc (fhandler_termios::line_edit): Return
> line_edit_error and remove last char from readahead buffer
> if accept_input() fails.
> * fhandler_tty.cc (fhandler_pty_master::accept_input): Return 0
> and restore readahead buffer when tty slave pipe is full.
- SetEvent (input_available_event);
- ReleaseMutex (input_mutex);
- Sleep (10);
- rc = WaitForSingleObject (input_mutex, INFINITE);
+ puts_readahead (p, bytes_left);
+ ret = 0;
+ break;
Won't this introduce a spinning situation since you are no longer
sleeping? Were we really inappropriately waiting for the input_mutex in
this case?
cgf