Skip to content

Backport !2582 “glib/win32: fix spawn from GUI regression” to glib-2-72

In commit 674072b1 ("glib/win32: check if dup() failed in helper process"), I happily added checks for dup() calls in the spawn helper. However, I didn't realize that GUI applications do not necessarily have a console attached, and will now fail spawning processes.

One way to check that is via a _fileno() call, as explained in: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fileno?view=msvc-170#return-value

Fixes: #2628 (closed)

Signed-off-by: Marc-André Lureau marcandre.lureau@redhat.com


Trivial backport of !2582 (merged) to glib-2-72.

Closes #2628 (closed)

Edited by Philip Withnall

Merge request reports