The husband's acceptance of the baby wasn't as instantaneous as it appeared. Remember, there was a scene where he returned from (probably) the pub and was still hostile to the wife. By the time he was going out to sea again would probably be a month or so. He had taken to the baby by then and yes, it being a boy was part of it. I wondered how he would explain the baby to his shipmates. Maybe men don't count?
I think the dying wife had been home with the baby for a while and came back to the Lady Emily because they thought it might be puerperal fever from part of the placenta being left in