If Abdul-JimmyBob Badguy should decide to start something, the last thing I want is the flight crew getting mixed-up in a firefight. And how are the legal/safety aspects managed outside the USA
Outside of the USA the bad guy's weapons will be found by security before boarding. The safe way is to make sure that no weapons get onto the aircraft.
Many years ago the UK discussed following the USA in carrying armed guards but the idea was quickly dropped when someone asked a simple question."What happens when the armed guard finds out that one of the aircrew has been screwing his wife or maybe finds some other grievance against the world in general".
In most of the world a professional and well paid security staff do a great job of keeping weapons and suspect people off of flights. If you feel a need for armed guards on aircraft you need to rather start asking some serious questions about your security on the ground.