aboutsummaryrefslogtreecommitdiffstats
path: root/g10/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/exec.c')
-rw-r--r--g10/exec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/g10/exec.c b/g10/exec.c
index f2209d8f2..229c968bc 100644
--- a/g10/exec.c
+++ b/g10/exec.c
@@ -394,6 +394,8 @@ int exec_write(struct exec_info **info,const char *program,
args_in==NULL?program:shell,
strerror(errno));
+ /* This mimics the POSIX sh behavior - 127 means "not found"
+ from the shell. */
if(errno==ENOENT)
_exit(127);
@@ -537,7 +539,10 @@ int exec_finish(struct exec_info *info)
WIFEXITED(info->progreturn))
ret=WEXITSTATUS(info->progreturn);
else
- ret=127;
+ {
+ log_error(_("unnatural exit of external program\n"));
+ ret=127;
+ }
}
#endif