Mechanism for the thionyl chloride:
Thirdly, the original OH group is transformed into a good leaving group and is simply displaced once the chloride ion makes its attack. The reaction of a carboxylic acid along with thionyl chloride follows the common pathway displayed in diagram.
Figure: Intermediate involved in the thionyl chloride reaction to form an acid chloride.
The leaving group (SO2Cl) impulsively fragments to generate hydrochloric acid and sulfur dioxide. The later is lost as a gas that assists to drive the reaction to completion. The detailed mechanism is displayed in diagram.
Figure: Mechanism for the thionyl chloride reaction with a carboxylic acid to form an acid chloride.