Why don't you find out how the Israeli airlines deal with this problem. I'm assuming they're provided with enough food and drink within the cockpit to take care of their needs so that the cockpit door isn't open. Why bar a door to prevent intrusion if you're going to open the door from the inside to get food and possibly leave the cockpit vulnerable?