[pacman-dev] [PATCH] redirect scriptlet stderr through alpm
j at skurvy.no-ip.org
Fri May 21 06:41:08 EDT 2010
On Fri, 2010-05-21 at 12:33 +0200, Xavier Chantry wrote:
> I would not bother trying to make chroot fail, just suppose it fails,
> and make the code printf and exit(1) for a quick test.
> >> IMO it's worth a comment explaining we use printf instead of alpm_log
> >> to avoid callback in child because it can cause problems.
I'll test this and add that...
> Well I first thought it was an error path, but then why not handling
> it like one ?
> e.g. just below in the code :
> _alpm_log(PM_LOG_ERROR, _("call to waitpid failed (%s)\n"),
> retval = 1;
> goto cleanup;
> Now looking at the manpage, I see it fails just if/like malloc does.
> But we usually handle malloc/calloc failures as well in the code using
> MALLOC/CALLOC macros.
... then put the error handling back in and resubmit.
More information about the pacman-dev