1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* hkp.c (parse_hkp_index): Be more robust with keyservers returning very

unparseable responses.

* exec.c (exec_read): Catch and display an error when the remote process
exits unnaturally (i.e. segfault) so the user knows what happened.  Also
fix exec_write stub which has a different number of arguments now.
This commit is contained in:
David Shaw 2002-06-06 04:04:35 +00:00
parent d8524b8461
commit e1f88c5d3f
3 changed files with 24 additions and 7 deletions

View file

@ -43,7 +43,7 @@
#ifdef NO_EXEC
int exec_write(struct exec_info **info,const char *program,
const char *args_in,int writeonly,int binary)
const char *args_in,const char *name,int writeonly,int binary)
{
log_error(_("no remote program execution supported\n"));
return G10ERR_GENERAL;
@ -473,14 +473,20 @@ int exec_read(struct exec_info *info)
info->progreturn=127;
goto fail;
}
#if defined(WIFEXITED) && defined(WEXITSTATUS)
if(WIFEXITED(info->progreturn))
info->progreturn=WEXITSTATUS(info->progreturn);
else
{
#ifdef WEXITSTATUS
info->progreturn=WEXITSTATUS(info->progreturn);
#else
info->progreturn/=256;
#endif
log_error(_("unnatural exit of external program\n"));
info->progreturn=127;
goto fail;
}
#else
/* If we don't have the macros, do the best we can. */
info->progreturn/=256;
#endif
/* 127 is the magic value returned from system() to indicate
that the shell could not be executed, or from /bin/sh to