Remove the PID file.
767337
def remove(self):
        
        if isfile(self.pid_file):
            try:
                remove(self.pid_file)
            except Exception as e:
                self.die('Failed to remove PID file: {}'.format(str(e)))
        else:
            return True
296301
def cleanup(self):
        """"""
        for file in glob.glob(self.basename + '*'):
            os.unlink(file)
676802
def purge(self, connection):
        """"""
        self._checkpid()
        if connection.pid == self.pid:
            idx = connection._pattern_idx
            if connection in self._in_use_connections[idx]:
                self._in_use_connections[idx].remove(connection)
            else:
                self._available_connections[idx].remove(connection)
            connection.disconnect()
29143
def delete(self):
        
        fcid = None
        pid = None

        if isinstance(self, File):
            fcid = self.fid
            pid = self.cid
        elif isinstance(self, Directory):
            fcid = self.cid
            pid = self.pid
        else:
            raise APIError('Invalid BaseFile instance.')

        if not self._deleted:
            if self.api._req_rb_delete(fcid, pid):
                self._deleted = True
                return True
        else:
            raise APIError('This file or directory is already deleted.')
1344357
public void removeApplication(String pid) {
        // remove the application listener from the set we know about and stop it
        ApplicationListeners listeners = _appListeners.remove(pid);

        //check that the app is known, this can be run after the app is already removed.
        if (listeners != null) {
            listeners.stopListeners(true);
        }
    }
1121254
public final void remove(String pid) throws LowlevelStorageException {
        File file = getFile(pid);

        pathRegistry.remove(pid);
        fileSystem.delete(file);
    }
314598
def _kill(self, kill_sig):
    """"""
    if self.pid:
      os.kill(self.pid, kill_sig)
842839
def clear(self):
        """"""
        super(Router, self).clear()
        for name in self.todo:
            filename = os.path.join(self.migrate_dir, name + '.py')
            os.remove(filename)
1034359
def cleanup():
    """"""
    if _output_dir and os.path.exists(_output_dir):
        log.msg_warn("Cleaning up output directory at '{output_dir}' ..."
                     .format(output_dir=_output_dir))
        if not _dry_run:
            shutil.rmtree(_output_dir)
544921
def stop(&block)
      block.call('stop') unless block.nil?
      pid = read_pid
      fail 'No valid PID file.' unless pid && pid > 0
      Process.kill('TERM', pid)
      delete_pid
      puts 'Process terminated.'
    end
1204059
public function cleanUp()
    {
        $this->filesystem->remove($this->compressedArchivePath);
        $this->filesystem->remove($this->outputPath);
    }
549283
def kill(remove_pid_file=true)
      if running?
        log(:info, "Killing \"#{@name}\" (PID: #{@pid})")
        execute_callback(:kill)
        Process.kill 9, @pid
      end

      FileUtils.rm(@pid_file) if remove_pid_file
    rescue Errno::ENOENT
    end
140748
protected static void destroyProcess(String pid, long sleeptimeBeforeSigkill,
                                    boolean inBackground) {
    terminateProcess(pid);
    sigKill(pid, false, sleeptimeBeforeSigkill, inBackground);
  }
196821
def kill(pid_file):
    
    try:
        with open(pid_file) as f:
            os.kill(int(f.read()), 9)
        os.remove(pid_file)
    except (IOError, OSError):
        return False
    return True
1304553
def release(self):
        
        
        if self.is_locked_by_me():
            os.remove(self.lock_filename)
            logger.debug('The lock {} is released by me (pid: {}).'.format(self.lock_filename, self.pid))
        if self.fd:
            os.close(self.fd)
            self.fd = None
415137
def close(self):
        """"""
        self._filesystem.open_files[self.filedes].remove(self)
        os.close(self.fd)
252655
def _cleanup(self):
        """"""
        self._expkg = None
        self._extmp = None
        self._flag_e = True
        self._ifile.close()