def _update_pid(self, process):
        pidfile = os.path.join(self.get_path(), 'cassandra.pid')

        start = time.time()
        while not (os.path.isfile(pidfile) and os.stat(pidfile).st_size > 0):
            if (time.time() - start > 30.0):
                print_("Timed out waiting for pidfile to be filled (current time is %s)" % (datetime.now()))
                break
            else:
                time.sleep(0.1)

        try:
            with open(pidfile, 'rb') as f:
                if common.is_win() and self.get_base_cassandra_version() >= 2.1:
                    self.pid = int(f.readline().strip().decode('utf-16').strip())
                else:
                    self.pid = int(f.readline().strip())
        except __HOLE__ as e:
            raise NodeError('Problem starting node %s due to %s' % (self.name, e), process)
        self.__update_status()
dataset/ETHPy150Open pcmanus/ccm/ccmlib/node.py/Node._update_pid