And there's only SIMULATED pressure in a ship. Scientifically speaking (Science-Fictionally speaking that is) The pressure is generated to make ship life comfortable (and even give you air in some cases) Aka LIFE SUPPORT. However, If a ship is breached, There are Alarms, one of which is almost always connected to the Life Support system.
Example Situation: Freighter is travelling through an asteroid field, one really big one SOMEHOW gets past the shields and pierces the hull. The Life Support STOPS to prevent wasting oxygen (Badly needed) and spewing it into space, the Pilot and crew hear the alarms and are most likely wearing their suits already (On shift is likely) And take about 20 secs to put their helmets on and self-pressurize. They fix it, and manually re-engage the Life Support. That's in a FREIGHTER, Fighter pilots undoubtedly already wear their suits, and the fighters only have Emergency Life Support in case the Suit's fail.
NOW. I say we stop going off topic about this and leave it at that.
"The pen is mightier than the sword." -Edward Bulwer-Lytton. "Whoever said the pen is mightier than the sword never encountered automatic weapons." -General Douglas MacArthur