Makkot 22 - How Are Lashes Administered
The maximum number of lashes that can be given is thirty-nine, because it says "in the number of forty". Rabbi Yehudah says that this means exactly forty. The court assesses how many lashes the transgressor can stand, and chooses a number divisible by three. If in the middle of giving him lashes he appears weak, they stop the lashes, and he does not have to endure more.
The attendant of the court binds his hands on either side of the post, grasps his garments and pulls them away from the area to be lashed, and if they tear, they tear. A stone is placed behind the one being lashed, and the attendant stands on it with the strap in his hand. The whip is made of two calfskin straps with additional straps of donkey hide; the whip's handle is one hand-breadth, and the length of it is such that its tip should reach the beginning of the stomach when he is lashed across his back.
The reader reads appropriate verses to him. If he died as the result of lashing, the attendant is not liable, but if the attendant gave an extra blow and he died, the attendant goes into exile like all who kill by mistake. If the lashed one lost control of his bodily functions and soiled himself, he is exempt from any further lashes.
Art: Bartholomeus Molenaer - A Wife Beating her Husband