Holding your breath while pregnant?

So today at work something was burning and the smell quickly filled the building. I held my breath and ran to get outside. Just wondering if holding your breath will hurt the baby? Whenever I smell cigarette smoke etc.. just wondering if this is harmful?