Check out Jeremy Mates’ reallykill script if you need to effectively kill a processes with a preference for graceful shutdown.