mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 13:26:16 +01:00
glib/spawn-win32: workaround SEGV on spawnvpe
I haven't been able to write a reproducer yet and report the bug to Microsoft, but this is 100% crashing when running "meson test gsubprocess" Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
2ebe30e170
commit
68aff6dd07
@ -637,6 +637,13 @@ fork_exec (gint *exit_status,
|
||||
|
||||
argc = protect_argv (argv, &protected_argv);
|
||||
|
||||
/*
|
||||
* FIXME: Workaround broken spawnvpe functions that SEGV when "=X:="
|
||||
* environment variables are missing. Calling chdir() will set the magic
|
||||
* environment variable again.
|
||||
*/
|
||||
_chdir (".");
|
||||
|
||||
if (stdin_fd == -1 && stdout_fd == -1 && stderr_fd == -1 &&
|
||||
(flags & G_SPAWN_CHILD_INHERITS_STDIN) &&
|
||||
!(flags & G_SPAWN_STDOUT_TO_DEV_NULL) &&
|
||||
|
Loading…
Reference in New Issue
Block a user