Does a 2007 Chevy cobalt have an automatic shut off when it runs out of oil? Buddy of mine busted a hole in oil pan and it shut off. Just wondering if it has a safety feature?
Most engines today do have an emergency shut off or "limp home" mode to prevent damage to the engine under extreme circumstances. It's likely that the sudden drop in oil pressure caused by the hole in the oil pan may have triggered such an instance.
Of course, you need to repair the oil pan and refill the oil as soon as possible. You should never drive a car if the engine does not have sufficient oil. If the engine is dry, then that means you should get a tow to a repair shop -- do not drive it there.
Connecting an OBD device can help you find the error code that would have tripped the engine shutoff. Lots of shops offer this service for free or at a very low cost.