4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-28 20:15:24 +08:00
Corinna Vinschen 230f4802ed Cygwin: pipes: fix error handling when creating a pipe
The nt_create() function returns a Windows error code, but
it only calls NT functions.  In one case, it returns the
Windows error code without converting the NT status code
to a Windows error code first.

To fix this mess, change nt_create() to a function returning
the NT status code directly. Let the (only) caller handle
the conversion from NT status code to errno value.

Reported-by: "knut st. osmundsen" <bird-cygwin@anduin.net>
Fixes: f56206cd86b9 ("Cygwin: fhandler_pipe: fix permission problem")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-26 09:45:04 +01:00
..
2025-02-26 09:45:04 +01:00

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Cygwin documentation is available on the net at https://cygwin.com
You might especially be interested in

https://cygwin.com/faq/faq.html#faq.programming.building-cygwin