This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fhandler_tty_slave::ioctl (FIONBIO) return status


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]