summaryrefslogtreecommitdiff
path: root/glib/tests/path-test-subdir
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2021-01-27 10:53:22 +0000
committerSimon McVittie <smcv@collabora.com>2021-01-28 16:49:06 +0000
commit7ff0fb3af53a32d0094cf4767bbd019b1cfe550e (patch)
treeca8e762a29fc23859765fc10b58d83144dc544a3 /glib/tests/path-test-subdir
parentfdc192f4601cb30b382e14f1a37722271384826e (diff)
downloadglib-7ff0fb3af53a32d0094cf4767bbd019b1cfe550e.tar.gz
spawn: Don't set a search path if we don't want to search PATH
do_exec() and g_execute() rely on being passed a NULL search path if we intend to avoid searching the PATH, but since the refactoring in commit 62ce66d4, this was never done. This resulted in some spawn calls searching the PATH when it was not intended. Spawn calls that go through the posix_spawn fast-path were unaffected. The deprecated gtester utility, as used in GTK 3, relies on the ability to run an executable from the current working directory by omitting the G_SPAWN_SEARCH_PATH flag. This *mostly* worked, because our fallback PATH ends with ".". However, if an executable of the same name existed in /usr/bin or /bin, it would run that instead of the intended test: in particular, GTK 3's build-time tests failed if ImageMagick happens to be installed, because gtester would accidentally run display(1) instead of testsuite/gdk/display. Fixes: 62ce66d4 "gspawn: Don’t use getenv() in async-signal-safe context" Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977961
Diffstat (limited to 'glib/tests/path-test-subdir')
0 files changed, 0 insertions, 0 deletions