If a person has something happen to him (i.e., someone speaks to him or approaches him) while praying what should he do?
If it is a man, he should pronounce tasbeeh (glorifying Allah by saying "subhan Allah"), and if it’s a woman, she should clap. The evidence is Sahl Bin Saad’s narration that the Messenger (peace and blessings of Allah be upon him) said, "If something bothers you in your salaat, men should make tasbeeh and women should clap."1
From the book What Should You Do in the Following Situations... ?
1 Sunan Abu Dawood 941, Sahih al-Bukhari (Bugha print) 1145, and Sahih Muslim 106.