It really depends on the situation.
Video encoding, for example, a process that can take hours, must have confirmation, only because you can accidentally press the button 99%.
The initialization process of the installer or other application, on the other hand, does not need to be confirmed, since it can usually be restarted quickly enough and will not take much time.
If the Cancel button starts a process that could potentially take a lot of time (say, he needs to undo the changes), the user should be informed about this, possibly with a pop-up window, but there may be enough text next to the button.
The general rule is to minimize confirmation dialogs if, for example, it can be replaced with the Undo action. I do not think this applies to most Cancel buttons.
deceze
source share