Make sure to search location of XST backends

2001-04-11  Bradford Hovinen  <hovinen@ximian.com>

	* location.c (run_backend_proc): Make sure to search location of
	XST backends

	* Makefile.am (INCLUDES): Added XST_BACKEND_LOCATION
This commit is contained in:
Bradford Hovinen 2001-04-12 01:43:31 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent c366b85ccf
commit 69ff23e49b
4 changed files with 33 additions and 14 deletions

View file

@ -1393,10 +1393,20 @@ run_backend_proc (gchar *backend_id)
}
else if (pid == 0) {
int i;
gchar *path, *path1;
dup2 (fd[0], 0);
for (i = 3; i < FOPEN_MAX; i++) close (i);
path = g_getenv ("PATH");
if (!strstr (path, XST_BACKEND_LOCATION)) {
path1 = g_strconcat (XST_BACKEND_LOCATION, ":", path,
NULL);
setenv ("PATH", path1, TRUE);
g_free (path1);
}
args[0] = gnome_is_program_in_path (backend_id);
args[1] = "--set";
args[2] = NULL;