For male ghosts with no heirs to light incense and make offerings to them, the family can adopt another son to take that responsibility; there is no need for male ghosts to "harass" the ladies in the land of the living.
於是沒有子嗣、斷了香煙的男鬼，只要「討嗣」，讓家族過繼一個兒子來供養他即可，不必來騷擾陽間淑女。