set most things with ?= so they can be overridden
init kids to NULL so the later check is correct

prevents XFree trying to free junk in the error path