glib/win32: introduce private g_win32_reopen_noninherited()

Used in following commits, including in some GIO experiments, so make it
a private API.

For now, this implementation is similar to the glib/gspawn-win32.c one,
with mroe error checking and better on error behaviour. A following
patch will also fix the case of duplicating sockets.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2022-04-07 17:53:54 +04:00
parent 982b074fa9
commit c984db650f
4 changed files with 71 additions and 0 deletions

View File

@@ -171,6 +171,10 @@ typedef struct {
/* See gwin32.c */
gchar *(*g_win32_find_helper_executable_path) (const gchar *process_name,
void *dll_handle);
int (* g_win32_reopen_noninherited) (int fd,
int mode,
GError **err);
#endif