Ignore the G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully
authorTor Lillqvist <tml@iki.fi>
Sun, 17 Nov 2002 03:52:55 +0000 (03:52 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sun, 17 Nov 2002 03:52:55 +0000 (03:52 +0000)
commit1f04f2cce236311e79fef775890a5114123ced37
treed1d9f3d8d5593d32a331a224be0015d8014667b1
parent78000c3b54f1d71b8d092f5d4bbe9be7013b9fb2
Ignore the G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully

2002-11-17  Tor Lillqvist  <tml@iki.fi>

* glib/gspawn-win32.c (g_spawn_async_with_pipes): Ignore the
G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully implemented
on Windows, at least not now. Always pass dont_wait as TRUE to
do_spawn_with_pipes(). The semantics of the dont_wait parameter is
very different from the semantics of the intermediate_child
parameter to fork_exec_with_pipes() in the Unix version. This
fixes a serious bug, g_spawn_async() in fact behaved
synchronously.

(do_spawn_with_pipes, do_spawn): Rename from
fork_exec_with_pipes() and do_exec(), those names were from the
Unix bersion, and misleading.

(close_and_invalidate): Don't try to close invalid fds.

* glib/gspawn.c (g_spawn_async_with_pipes): Add warning about
Windows behaviour. There is no fork(), so the child_setup()
function is in fact called in the parent.

* glib/gspawn-win32-helper.c (WinMain): Insert spaces in argv
debugging output.

* tests/spawn-test-win32-gui.c: New file. Test program to be
linked as a GUI application. Behaves differently depending on how
invoked (by spawn-test).

* tests/spawn-test.c (run_tests): On Win32, run the
spawn-test-win32-gui program, too, in several ways, synchronously
and asynchronously.

* tests/Makefile.am: Corresponding change.
13 files changed:
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gspawn-win32-helper.c
glib/gspawn-win32.c
glib/gspawn.c
tests/Makefile.am
tests/spawn-test-win32-gui.c [new file with mode: 0644]
tests/spawn-test.c