Taken from a page of the book of The Prisoner
As an adjunct to bis's ideas of removing the door between the cockpit and the rest of the plane, and dead man switches for the non-cockpit flight crew...
The pilots could monitor the rest of the plane via CCTV, and at the first sign of trouble, release the gas. Everyone onboard except the cockpit crew would be rendered unconscious: terrorists, passengers, and other flight crew. This way nobody gets shot, stabbed, or beaten senseless; and the terrorists are still alive to answer any questions the authorities might have for them.