From c931cda3a9797da8ffd3ad24562a88837f5f4773 Mon Sep 17 00:00:00 2001 From: corvid Date: Thu, 7 Jan 2010 14:49:43 +0000 Subject: also try bindir when looking for dpid --- src/IO/dpi.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/IO/dpi.c') 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) { -- cgit v1.2.3