diff options
author | corvid <corvid@lavabit.com> | 2010-01-07 14:49:43 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2010-01-07 14:49:43 +0000 |
commit | c931cda3a9797da8ffd3ad24562a88837f5f4773 (patch) | |
tree | 81bbbef54cb77aeeea32a4c0ffcd9b3053b214b4 /src | |
parent | 624108f1c58138d272e5c37efe2c04740392fcfe (diff) |
also try bindir when looking for dpid
Diffstat (limited to 'src')
-rw-r--r-- | src/IO/Makefile.am | 1 | ||||
-rw-r--r-- | src/IO/dpi.c | 16 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/IO/Makefile.am b/src/IO/Makefile.am index 98d8d43a..b168073c 100644 --- a/src/IO/Makefile.am +++ b/src/IO/Makefile.am @@ -1,3 +1,4 @@ +AM_CPPFLAGS=-DDILLO_BINDIR='"$(bindir)/"' AM_CFLAGS = @LIBFLTK_CFLAGS@ AM_CXXFLAGS = @LIBFLTK_CXXFLAGS@ diff --git a/src/IO/dpi.c b/src/IO/dpi.c index 6491ea27..931fc4a6 100644 --- a/src/IO/dpi.c +++ b/src/IO/dpi.c @@ -364,13 +364,17 @@ static int Dpi_start_dpid(void) Dpi_close_fd(st_pipe[0]); if (execl(path1, "dpid", (char*)NULL) == -1) { dFree(path1); - if (execlp("dpid", "dpid", (char*)NULL) == -1) { - MSG("Dpi_start_dpid (child): %s\n", dStrerror(errno)); - if (Dpi_blocking_write(st_pipe[1], "ERROR", 5) == -1) { - MSG("Dpi_start_dpid (child): can't write to pipe.\n"); + path1 = dStrconcat(DILLO_BINDIR, "dpid", NULL); + if (execl(path1, "dpid", (char*)NULL) == -1) { + dFree(path1); + if (execlp("dpid", "dpid", (char*)NULL) == -1) { + MSG("Dpi_start_dpid (child): %s\n", dStrerror(errno)); + if (Dpi_blocking_write(st_pipe[1], "ERROR", 5) == -1) { + MSG("Dpi_start_dpid (child): can't write to pipe.\n"); + } + Dpi_close_fd(st_pipe[1]); + _exit (EXIT_FAILURE); } - Dpi_close_fd(st_pipe[1]); - _exit (EXIT_FAILURE); } } } else if (pid < 0) { |