parameters: (device, tool)
docstring: Kills the forwarder process running on the device.
  
      Note that the global lock must be acquired before calling this method.
  
      Args:
        device: Instance of DeviceUtils for talking to the device.
        tool: Wrapper tool (e.g. valgrind) that can be used to execute the device
              forwarder (see valgrind_tools.py).
docstring_summary: Kills the forwarder process running on the device.
docstring_tokens: Kills the forwarder process running on the device .
function: def _KillDeviceLocked(device, tool):
      """Kills the forwarder process running on the device.
  
      Note that the global lock must be acquired before calling this method.
  
      Args:
        device: Instance of DeviceUtils for talking to the device.
        tool: Wrapper tool (e.g. valgrind) that can be used to execute the device
              forwarder (see valgrind_tools.py).
      """
      logging.info('Killing device_forwarder.')
      Forwarder._instance._initialized_devices.discard(str(device))
      if not device.FileExists(Forwarder._DEVICE_FORWARDER_PATH):
        return
  
      cmd = '%s %s --kill-server' % (tool.GetUtilWrapper(),
                                     Forwarder._DEVICE_FORWARDER_PATH)
      device.RunShellCommand(
          cmd, env={'LD_LIBRARY_PATH': Forwarder._DEVICE_FORWARDER_FOLDER},
          check_return=True)
function_tokens: def _KillDeviceLocked ( device , tool ) : logging . info ( 'Killing device_forwarder.' ) Forwarder . _instance . _initialized_devices . discard ( str ( device ) ) if not device . FileExists ( Forwarder . _DEVICE_FORWARDER_PATH ) : return cmd = '%s %s --kill-server' % ( tool . GetUtilWrapper ( ) , Forwarder . _DEVICE_FORWARDER_PATH ) device . RunShellCommand ( cmd , env = { 'LD_LIBRARY_PATH' : Forwarder . _DEVICE_FORWARDER_FOLDER } , check_return = True )