added env param to user supplied death callback