109. Sitting Near Someone Who is Davening
18:17 If one has to pass wind while saying Shemoneh Esrei, the procedure differs depending on where he is. If he is praying at home, he steps four cubits (about six feet) back or to the side to let it out. He then waits until the odor dissipates and returns to his place. He then says a text to the effect that God created us with many holes and openings and that He knows our sources of embarrassment. (See the Kitzur Shulchan Aruch for the full text in Hebrew.) One then concludes saying Shemoneh Esrei. However, if the gas comes on him without advance warning, or if he is davening in shul where it would be embarrassing to move the four cubits from his place, he remains standing where he is and he does not insert the special text (though it’s good to recite it mentally – MB 103:9). Rather, he just waits for the odor to dissipate and then finishes saying Shemoneh Esrei. (If the delay was so long that he could have finished the entire Shemoneh Esrei in that time, he must start again at the beginning – MB103:8.)
18:18 One may not sit within four cubits (six feet) in any direction of a person who is saying Shemoneh Esrei unless he is also engaged in prayers. Some authorities also permit one to sit if he is studying Torah out loud. In any event, one should not sit in front of one saying Shemoneh Esrei as far as he can see, even if he is seated to recite Shema. One may stand on any side of a person saying Shemoneh Esrei, even in front of him.