summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/IO/Makefile.am1
-rw-r--r--src/IO/dpi.c16
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) {