On Wed, 27 Jan 2010, Spencer Oliver wrote:

> Cygwin would fail to reopen a previously written file if the mode is
> not given.

What do you mean?

> Simplified converting the open flags and made sure the win32 O_BINARY
> bit is set.

ACK.

> Added define for systems that do not support O_BINARY.

ACK.

> Signed-off-by: Spencer Oliver <[email protected]>

You fail to mention this though:

>                               if (strcmp((char *)fn, ":tt") == 0) {
> -                                     if ((mode & 3) == 0)
> -                                             result = dup(0);
> +                                     if (m < 4)
> +                                             result = STDIN_FILENO;
>                                       else
> -                                             result = dup(1);
> +                                             result = STDOUT_FILENO;

Why are you removing the dup()?

The remote application does open stdin/stdout explicitly, and may well 
close them explicitly as well.  It is therefore a bad idea to pass our 
own stdin/stdout straight to the remote application.


Nicolas
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to