fhandler_tty_slave::ioctl (FIONBIO) return status

Brian Ford ford@vss.fsi.com
Thu Oct 23 22:42:00 GMT 2003


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.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444



More information about the Cygwin-patches mailing list