Actionstan - I didn't weigh in on your previous thread, because, frankly, there was some good advice.
There are a couple of points that I would like to add.
1. Practice, Practice, Practice. You, and whoever you plan on using the gun, have to be able to operate it when it's dark, you're suddenly awakened, and the adrenaline is pumping (so, you've lost your fine motor skills and concentration). Whatever you choose, make certain that you can operate it, including malfunctions, loading, etc. and that you can hit a target accurately.
2. You want to be able to lock it up? Handgun is easier, though it has detractors, who compare the greater ease of aiming and greater power of a long gun. Just remember that a long gun is less easy to lock up and to retrieve.
Buy quality. I've never regretted that...and make sure you have enough budget left over for lots of ammo. Muscle memory takes about 2,000 to 3,000 repetitions of an action to truly learn it. So, you've got a lot of practice ahead of you...
My personal recommendation is a 6" .357 revolver. Easy to use, no slide/magazine drills, and no safety. Load it with .38 SPL wadcutters to practice. 125 Gr JHP .357 Magnum for real.
I carry an H&K USP Compact, personally, but I've been through quite a bit of training with it...and several thousand rounds of practice ammo...
Did I mention that you should practice?