msvcrt: implement _pipe

Alexandre Julliard julliard at winehq.org
Wed Dec 8 09:04:46 CST 2004


Juan Lang <juan_lang at yahoo.com> writes:

> +    fd = msvcrt_alloc_fd(readHandle, wxflags);
> +    if (fd != -1)
> +    {
> +      pfds[0] = fd;
> +      fd = msvcrt_alloc_fd(writeHandle, wxflags);
> +      if (fd != -1)
> +        pfds[1] = fd;
> +    }
> +    if (fd == -1)
> +    {
> +      CloseHandle(readHandle);
> +      CloseHandle(writeHandle);
> +      *MSVCRT__errno() = MSVCRT_EMFILE;
> +      ret = -1;
> +    }

You need to free pfds[0] on failure if it was allocated.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list