When a pilot needs to use the restroom during a flight, a very strict "Two-Person Rule" security protocol is triggered. For safety reasons, there must always be two authorized people in the cockpit at all times. If one pilot needs to leave, a flight attendant is called to the flight deck; they enter the cockpit and the door is locked behind them before the pilot exits. This ensures that if the remaining pilot were to become incapacitated, the flight attendant could immediately open the door for the returning pilot. To minimize the time the door is open, flight attendants often use a "service cart" as a physical barrier across the aisle to block passengers from approaching the cockpit area. During the brief transition, the pilots use a coded communication system and a video monitor to verify each other's identity before the door is unlocked. This high-stakes "bathroom break" procedure is a mandatory FAA and international safety requirement designed to prevent unauthorized entry and ensure the continuous, safe operation of the aircraft.