How to stop taskgated on Sierra?
Launchd is keeping the process alive. You need to run

$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.taskgated*.plist


to unload the daemon. To load it again, run:

$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.taskgated*.plist