aboutsummaryrefslogtreecommitdiff
path: root/src/directive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/directive.c')
-rw-r--r--src/directive.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/directive.c b/src/directive.c
index 8893675..cb656e7 100644
--- a/src/directive.c
+++ b/src/directive.c
@@ -485,13 +485,18 @@ run_check_script (const char *script, struct file_triplet *trp,
setenv ("WYDAWCA_SOURCE", spool->source_dir, 1);
setenv ("WYDAWCA_DEST", spool->dest_dir, 1);
setenv ("WYDAWCA_URL", spool->url, 1);
setenv ("WYDAWCA_TRIPLET_BASE", trp->name, 1);
setenv ("WYDAWCA_DIST_FILE", trp->file[file_dist].name, 1);
- chdir (temp_homedir);
+ if (chdir (temp_homedir))
+ {
+ logmsg (LOG_CRIT, "cannot change to %s: %s",
+ temp_homedir, strerror (errno));
+ _exit (127);
+ }
argv[0] = "sh";
argv[1] = script_file;
argv[2] = NULL;
execv ("/bin/sh", argv);

Return to:

Send suggestions and report system problems to the System administrator.