def write_subproc_pidfile(self):
        if not self.subprocpidfile: return
        try:
            f = open(self.subprocpidfile, 'w')
            for pid, process in self.pidhistory.iteritems():
                f.write('%s %d %d\n' %
                        (process.config.name, pid, process.laststart))
            f.close()
        except (IOError, __HOLE__):
            self.logger.critical('could not write sub-process pidfile %s' %
                                 self.subprocpidfile)
        else:
            self.logger.info('supervisord wrote sub-process pidfile')
dataset/ETHPy150Open XiaoMi/minos/supervisor/supervisor/options.py/ServerOptions.write_subproc_pidfile