Exposure to death is associated with positive attitudes and higher knowledge about end-of-life care in graduating medical students.