The Gemara on daf 32b relates a story which many find difficult. The story is in relationship to the discussion about where it is and where it is not permissible to interrupt one's prayers. This is the outline of the story:
There was once a pious man who was praying while traveling along a path when an officer (hegmon) came along and greeted him (literally, gave him shalom). The man did not respond to the greeting, but continued to pray without interruption. As he concluded his prayers, the officer said to him: "You endangered yourself. I could have killed you." The pious man asked him to wait until he was completely finished with his prayers, and then he explained to the officer that in his prayers, he was standing before the King of kings, and certainly the officer himself would not interrupt his dialogue with a king if someone interrupted the dialogue with a greeting.
The question which troubles many meforshim is this: How could the man have taken such a risk and endangered his life? Surely this was a situation of pikuach nefesh, which justified interrupting his prayers.
So troubled was the author of the Taz by this question that he incorporated a discussion of this matter in his commentary on the Shulchan Aruch at the beginning of chapter 66. The Taz ) assumes that no officer would dare kill a person just for not responding to a greeting. At worst, he would take the person to a court of justice and would then discover that he meant no insult to the government by ignoring the greeting. The Taz further assumes that even the king himself would not simply kill such a person on the spot without pursuing due process. Therefore, the pious man had no reason to fear danger and could be confident that he was safe.
I always found this passage in the Taz very perplexing. The Taz lived in 17th century Poland. Not only did he know about pogroms, but he experienced them personally. He surely knew that a Cossack officer would readily kill a Jew for far less of an offense than not returning a greeting. Why he had such a sanguine opinion of Gentile officers remains beyond my understanding.
Therefore, I have come to appreciate a different approach to the question of why this pious man endangered his life and persisted in his prayers. It is an approach which is given by Rabbi Yechezkel Landau, the author of the commentary Tzlach, on our masechta. He lived a full hundred years after the Taz.
Tzlach draws our attention to the fact that the officer approached the pious man with a greeting—nasan lo shalom. The words shalom aleichem, or their Latin equivalent, were the first words out of his mouth. This clue alone was sufficient evidence to justify the pious man's assumption that this officer was not a threat to his life. A person who opens a conversation with a smile in greeting and blessings of peace can be trusted not to harm another unjustly.
Tzlach teaches us at least two important lessons here. One is to pay careful attention to every word in the text. Many of us read this text but simply did not notice the fact that the officer initiated the conversation with blessings of shalom.
The other lesson is about the tremendous importance of greeting other people properly. Beginning a conversation with a phrase that conveys friendship is very praiseworthy. It assures the other person that he can feel secure and comfortable in the relationship that is about to evolve.