"These are the ordinances that you must set before them:
"When you buy a Hebrew slave, he is to serve for six years; then in the seventh he is to leave as a free man without paying anything.
References for Exodus 21:2
If he arrives alone, he is to leave alone; if he arrives with a wife, his wife is to leave with him.
References for Exodus 21:3
If his master gives him a wife and she bears him sons or daughters, the wife and her children belong to her master, and the man must leave alone.
"But if the slave declares: 'I love my master, my wife, and my children; I do not want to leave as a free man,'
his master is to bring him to the judges and then bring him to the door or doorpost. His master must pierce his ear with an awl, and he will serve his master for life.
References for Exodus 21:6