Handle exitlink and commandlink