def get_process_command(cmd_args):
  """Get command-line text for task process."""
  # Join arguments into command string, escaping any with spaces.
  cmd = ''
  for arg_index, arg in enumerate(cmd_args):
    if arg_index > 0:
      cmd += ' '
    if ' ' in arg:
      cmd += '"' + arg + '"'
    else:
      cmd += arg
  return cmd