Disclaimer: I did not vote. It depends on the situation.
As you know, my b-i-l was diagnosed with colon cancer two weeks before my husband was diagnosed with brain cancer. My sister chose not to tell either myself or our other sister and had not told their son (he was out of country).
The only reason I found out was because I called to tell her about my husband's illness and she finally told me as explanation why they wouldn't be here when dh had his surgery.
My b-i-l has been a member of our family for over 50 years. In other words, he's our brother, not b-i-l. To not be told of his life-threatening illness hurt, but I also understand why they didn't tell us. They are both very private people.
On the other hand, the support family and friends give a family during extremely stressful times is something ALL of us need. We may think we can handle it alone, but we can't. It's far too easy to fall into deep despair. A card, phone call, an email joke, a meal or a candy tin full of homemade fudge can help lift that despondency.
As for telling children, I think it depends on their age and how debilitating the illness/treatment might be.
Don't turn your back on support from those you love. After all, it truly is the only thing we can take with us.
I don't know if this is your secret or a theoretical illness, but either way,
love and hugs.
Blessed are the flexible for they shall never be bent out of shape.