parameters: (session)
docstring: Kills all processes that match a given *session* (which is a unique,
      45-character string).
docstring_summary: Kills all processes that match a given *session* (which is a unique,
      45-character string).
docstring_tokens: Kills all processes that match a given * session * ( which is a unique 45 - character string ) .
function: def kill_session_processes(session):
      """
      Kills all processes that match a given *session* (which is a unique,
      45-character string).
      """
      psopts = "aux"
      if MACOS:
          psopts = "-ef"
      elif OPENBSD:
          psopts = "-aux"
      cmd = (
          "ps %s | "
          "grep %s | " # Limit to those matching the session
          "grep -v grep | " # Get rid of grep from the results (if present)
          "awk '{print $2}' | " # Just the PID please
          "xargs kill" % (psopts, session) # Kill em'
      )
      logging.debug('kill_session_processes cmd: %s' % cmd)
      exitstatus, output = shell_command(cmd)
function_tokens: def kill_session_processes ( session ) : psopts = "aux" if MACOS : psopts = "-ef" elif OPENBSD : psopts = "-aux" cmd = ( "ps %s | " "grep %s | " # Limit to those matching the session "grep -v grep | " # Get rid of grep from the results (if present) "awk '{print $2}' | " # Just the PID please "xargs kill" % ( psopts , session ) # Kill em' ) logging . debug ( 'kill_session_processes cmd: %s' % cmd ) exitstatus , output = shell_command ( cmd )