code: def status(self):
          
  
          if self.pid is None:
              self.pid = self.read_pid()
          if self.pid is None:
              sp = BackgroundProcess.objects.filter(pk=1).first()
              if sp:
                  self.pid = sp.pid
          if self.pid is None or self.pid == 0:
              self.stderr.write("%s: can't determine process id exiting.\n" % datetime.now().isoformat(' '))
              return False
          if self.pid != getpid():
              # calling from outside the daemon instance
              try:
                  kill(self.pid, signal.SIGUSR2)
                  return True
              except OSError as e:
                  if e.errno == errno.ESRCH:
                      return False
                  else:
                      return False
  
          process_list = []
          for process in BackgroundProcess.objects.filter(parent_process__pk=self.process_id):
              process_list.append(process)
              process_list += list(process.backgroundprocess_set.filter())
          for process in process_list:
              logger.debug('%s, parrent process_id %d' % (self.label, process.parent_process.pk))
              logger.debug('%s, process_id %d' % (self.label, self.process_id))
docs: write the current daemon status to stdout