Capital gains exclusion for heirs

Under section 121d12. Can the listed beneficiary (who is also the executor) living in the home of a decedent's trust claim the capital gains deduction if they lived there for 4 years after decedent's death, while property was still in the trust?