code: def status(name, sig=None):
      '''
      Return the status for a service via daemontools, return pid if running
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' daemontools.status <service name>
      '''
      cmd = 'svstat {0}'.format(_service_path(name))
      out = __salt__['cmd.run_stdout'](cmd, python_shell=False)
      try:
          pid = re.search(r'\(pid (\d+)\)', out).group(1)
      except AttributeError:
          pid = ''
      return pif status(name, sig=None):
      '''
      Return the status for a service via daemontools, return pid if running
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' daemontools.status <service name>
      '''
      cmd = 'svstat {0}'.format(_service_path(name))
      out = __salt__['cmd.run_stdout'](cmd, python_shell=False)
      try:
          pid = re.search(r'\(pid (\d+)\)', out).group(1)
      except AttributeError:
          pid = ''
      return pid
docs: Return the status for a service via daemontools, return pid if running
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' daemontools.status <service name>