[pacman-dev]  remove exit() calls from libalpm
aurelien at archlinux.org
Sat Feb 11 13:44:00 EST 2006
> ok, here is an updated patch:
> i haven't added any extra FREE() for other allocated memory, if the
> patch is ok, then i can add
It is not that simple in all circumstances.
For instance, you chose to set pm_errno in db_open and pkg_new, but the
pm_errno value can be overwritten.
See code chunks where pkg_new is called: in case of a failure, pm_errno
is set afterwards, meaning that the pm_errno value set in pkg_new is lost.
It may or may not be more interesting to set pm_errno in the offending
function, or upon return of the function.
It depends on what is more meaningful from the frontend point of view...
This is what I meant with this item of the TODO:
"- review errors handling (globalise pm_errno usage, improve error
More information about the pacman-dev