Just to comment as a university biologist, with field experience, a lot information about black and grizzly bears gets mixed up, when the two animals couldn't be more different. Black bears tend to be quite timid, and will run away from people if you make a lot of noise. Yell, stamp, and jump up and down! For the most part, dogs (if well controlled) will alert you to them and scare them away. Black bear mothers have been known to frequently leave their cubs (who will usually find the nearest tree anyway) and take off -not that I would press the matter.
Bear spray is an excellent idea. It works. And everybody gets to go home! Just make sure it is real bear spray, not just pepper spray!
Exceptions to timidity are black bears that have become habituated to humans. This occurs if garbage is left unsecured by idiots, or if idiots have been feeding the bears! Much more rarely, black bears in isolated rural areas have been known (in several cases) to have predated on humans. But again, this is extremely rare. Do I worry about it when in black bear territory, unarmed? Asleep in my tent? No.
If you shoot a black bear, expect to pay a very hefty fine unless you can convince the skeptical game warden that you were indeed being attacked. The warden will not buy your story. Because it likely won't be true. You'll just be a panicked camper. And the wardens are very persistent in tracking people down. In most -virtually all- instances, the human -and not the poor bear- was at fault. That may give you some idea of how rare black bear attacks are, especially if one follows common sense camping precautions.
Using a relatively small caliber handgun for defense is not a good idea. If you are attacked, you'll need a lucky shot or six. Plus, you are likely to merely wound the bear, creating a real hazard for others and a lingering, horrible death for the wounded bear. A .357 Magnum with 158 grain hardcast lead or JSP bullets, pushed hard, would be a minimum. I carry (primarily against two-legged trouble) a .41Magnum Ruger Blackhawk, 6-1/2" barrel, which I can shoot very, very well, and I've used it for hunting black bears (in-season, unsuccessfully,with a friend backing me up with a 12-ga). That is more like black bear medicine if loaded with 210 or 220 grain hardcast lead or tough JHP.
Carry bear spray, bring your dogs (on leads), practice your good camp hygiene, and don't worry so much! You won't need your carry gun (for bears!). Now have a great time!