What rights does a homeowner have in event of a home invasion?

For the third time in just a week in our region, a homeowner — fearing for their life while at their home — shot and killed an apparent home intruder. The most recent incident happened Tuesday in Fairfield. Two separate other home invasion shootings happened in Modesto last week.