It had happened that when David was at Edom, Joab the commander of the army went up to bury the slain, and he killed every male in Edom.