fhandler_tty_slave::ioctl (FIONBIO) return status

Christopher Faylor cgf@redhat.com
Fri Oct 24 01:14:00 GMT 2003


On Thu, Oct 23, 2003 at 05:42:55PM -0500, Brian Ford wrote:
>On Thu, 23 Oct 2003, Christopher Faylor wrote:
>
>> I don't think it makes sense to use get_ttyp ()->ioctl_retval = 0;
>> here since we aren't actually communicating with the tty.
>>
>> Does something like this work?
>>
>Sure.  I don't actually have a test case.  This is just a hypothetical
>that I ran into.  Small suggestion below.
>
>> @@ -1086,9 +1088,9 @@ fhandler_tty_slave::ioctl (unsigned int
>>      }
>>
>>    release_output_mutex ();
>> +  retval = get_ttyp ()->ioctl_retval;
>>
>>  out:
>> -  int retval = get_ttyp ()->ioctl_retval;
>>    if (retval < 0)
>>      {
>>        set_errno (-retval);
>>
>You might want to move this if statement up too, as an optimization.

Yep.  Good point.

Thanks for the patch.  I've checked in my variation.

cgf



More information about the Cygwin-patches mailing list