[pacman-dev] trans.c : reworking of transaction interruptions.

Xavier shiningxc at gmail.com
Tue Sep 11 08:18:40 EDT 2007


On Sat, Sep 08, 2007 at 12:45:14AM +0200, Xavier wrote:
> diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
> index f62e588..2db4346 100644
> --- a/src/pacman/pacman.c
> +++ b/src/pacman/pacman.c
> @@ -208,8 +208,8 @@ static void cleanup(int signum)
>  		pm_fprintf(stderr, PM_LOG_ERROR, "Internal pacman error: Segmentation fault.\n"
>  		        "Please submit a full bug report with --debug if appropriate.\n");
>  		exit(signum);
> -	} else if((signum == SIGINT) && (alpm_trans_release() == -1)
> -						&& (pm_errno == PM_ERR_TRANS_COMMITING)) {
> +	} else if((signum == SIGINT)) {
> +		alpm_trans_interrupt();
>  		return;
>  	}
>  

hmm, my brain wasn't correctly working when I did this, I guess.
I didn't like this part, but instead of rewriting it, I just removed it
without trying to understand...

The previous code only caught ctrl+C when pacman was commiting a trans,
and only in this case it didn't exit directly. In all other cases, it exited.
With my patch, it never exits.

I actually wonder if that doesn't invalid my whole patch, I am not sure
yet and have to think more about it.

Dan, please don't pull this yet, and sorry.




More information about the pacman-dev mailing list