My husband and I have been married for six years and we have two kids, the oldest is five, and my husband is still not legal. I've told immigration just how important it is that he get his papers because of this and they said it doesn't matter how many kids he has, yada yada. They are culeros.
If the guy only has children that are US citizens, and no one else, he probably will have to wait for them to grow up and petition for him.
Your child will be able to file for your Residency he/she is 21 years old.
[Editor's Note: Once a citizen child reaches 21, they can then act as a sponsor for their parent to obtain Legal Residency. However, note that it is not possible to have an illegal alien obtain legal residency unless they leave the country first - that is, you can't come to the U.S. illegally, then have someone sponsor you to stay. You must leave the country, have someone sponsor you, then re-enter on a valid visa.]
Marrying a U.S. citizen and having children resulting from the marriage DOES NOT automatically award citizenship or permanent resident status to an alien, especially one who is deemed to be in the U.S. illegally. The non-citizen must follow the prescribed procedures as required by federal law through USCIS. The children ARE citizens if they were born in the United States OR if one of the parent is a U.S. citizen (not just a Resident, but a Citizen). http://www.uscis.org