Rename 'trigger' to 'emit', kill spawn on exit