[pacman-dev] [PATCH] src/pacman/pacman.c : split cleanup function.

Dan McGee dpmcgee at gmail.com
Sun Mar 9 13:01:36 EDT 2008


On Sun, Mar 9, 2008 at 7:05 AM, Chantry Xavier <shiningxc at gmail.com> wrote:
> This function was used in two different ways :
>  - as a signal handler : the argument was the signal number
>  - called manually for freeing the resources : the argument was the return
>   value
>  So the first part is now handler(int), and the second cleanup(int).
>  Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011388.html
>
>  Remaining problems :
>  - the return values are messy. for example, 2 can mean both that it was
>   interrupted (SIGINT == 2), or that --help or -V was used (returned by
>   parseargs).
>  - apparently signal is not portable and sigaction should be used instead
>
>  Signed-off-by: Chantry Xavier <shiningxc at gmail.com>
>  ---

Applied, thanks.




More information about the pacman-dev mailing list