src/pacman/pacman.c : split cleanup function.
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@gmail.com>