On the radiative equilibrium of a stellar atmosphere