notmuch_run_hook (notmuch_database_t *notmuch, const char *hook)
{
char *hook_path;
+ const char *config_path;
int status = 0;
pid_t pid;
return 1;
}
+ config_path = notmuch_config_path (notmuch);
+ if (setenv ("NOTMUCH_CONFIG", config_path, 1)) {
+ perror ("setenv");
+ return 1;
+ }
+
/* Check access before fork() for speed and simplicity of error handling. */
if (access (hook_path, X_OK) == -1) {
/* Ignore ENOENT. It's okay not to have a hook, hook dir, or even