nless you volunteered that you have a child, it is absolutely illegal to ask if you have children. Referencing "HR World"
What you can't ask: Do you have or plan to have children?
Clearly, the concern here is that family obligations will get in the way of work hours. Instead of asking about or making assumptions on family situations, get to the root of the issue by asking directly about the candidate's availability.
What to ask instead: Are you available to work overtime on occasion? Can you travel?