Question :

What is the ruling on determining the sex of the baby whether through killing the female spermatozoa, or any other way in order to have a male?

The Answer :

If it is done through having a certain type of food, taking a certain type of medication, or organizing the time of the marital relation, then it is permissible.