New internal function.
authorTor Lillqvist <tml@novell.com>
Sun, 24 Feb 2008 21:15:47 +0000 (21:15 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sun, 24 Feb 2008 21:15:47 +0000 (21:15 +0000)
commit17640e78d31579e2d5c76606df5bf71756827a21
tree812e45566cf00b1540d4d4da1dfef190b7b11a52
parent3bd512643d32ecbd2039e990b43c25df4e5a9436
New internal function.

2008-02-24  Tor Lillqvist  <tml@novell.com>

* glib/gutils.c (_glib_get_installation_directory): New internal function.

* glib/gspawn-win32.c: When spawning the helper process, use an
explicit full path. (#518292)

* glib/gspawn-win32.c
* glib/gspawn-win32-helper.c: Fix race condition when using the
helper process: When the helper process writes the handle of the
actual started user process to the parent process, it must be
duplicated in the parent process with DuplicateHandle() so that it
is a valid handle in that process. However, if the helper process
has happened to exit before the DuplicateHandle() call, the
duplication will fail. Thus we must synchronise the helper
process's exit. Use another pipe for this.

Take care not to inherit the writing end of this pipe to the
helper process. Also, in the helper process, take care not to
inherit either of the pipes used for communication with the parent
process to the started user process.

svn path=/trunk/; revision=6575
ChangeLog
glib/gspawn-win32-helper.c
glib/gspawn-win32.c
glib/gutils.c