It depends on the bus and the emissions levels. CNG buses without DOCs will emit large quantities of aldehydes, which are really bad for you. Ones with DOCs are probably quite benign.
Newer diesel powered buses will be equipped with particulate filters, and these filters not only trap the smoke, they also tend to burn off the volatile HC and CO emissions.
So basically, just stay away from old buses.