How to prevent "Do you want to terminate running processes" window when shutting down?
Terminal Preferences → Profiles, select the profile you're using (probably marked Default) in the sidebar on the left, then choose Shell. Under ‘Ask before closing:’, choose Never.