From 83e37fb9da0c7f399020254b436554f309e15223 Mon Sep 17 00:00:00 2001 From: epg <> Date: Fri, 13 Sep 2002 02:16:06 +0000 Subject: [PATCH] Make run_processor work again. --- mdeliver.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mdeliver.c b/mdeliver.c index 340e1e9..7e61c37 100644 --- a/mdeliver.c +++ b/mdeliver.c @@ -251,9 +251,10 @@ deliver(char *maildir, char *newfn) /* Run a program to process the new message. */ static void -run_processor(char *newfn) +run_processor(char *home, char *newfn) { pid_t pid; + char command[PATH_MAX]; FILE *errfile; char *fail; int olderrno; @@ -262,7 +263,8 @@ run_processor(char *newfn) if ((pid = fork()) > 0) { return; } else if (pid == 0) { - execl(".mdeliver-processor", ".mdeliver-processor", newfn, NULL); + snprintf(command, PATH_MAX, "%s/%s", home, ".mdeliver-processor"); + execl(command, command, newfn, NULL); if (errno == ENOENT) { /* Not having a processor is not an error. */ return; @@ -311,7 +313,7 @@ main(int argc, char *argv[]) deliver("Maildir", newfn); - run_processor(newfn); + run_processor(home, newfn); /* Always return 0 because deliver exits if it fails, and if it * succeeds we cannot return a failure code to the MTA. */ -- 2.56.0