Yes, doctors should inform terminally ill patients, because they have a right to be involved in their care. Knowing that a person is terminally ill can help them make different decisions. For example, when my grandma found out she was terminal, she started drinking large amounts of her favorite soda. If she's dying, why not? People can use information to make their life as good as possible with the time they have.
I believe that doctors have a duty and responsibility to inform patients that they are terminally ill. They should provide them all the treatment options to prolong their life and give them recommendations on the best method to go with. A doctor should never withhold any information and give them the best chance to live life to the fullest.