public Map<String, String> getLocks(String mountpoint) {
		List<String> lines = new ArrayList<>();
		
		ProcessBuilder task = new ProcessBuilder(new String[] { "lsof", "-F", "pn", "+D", mountpoint });
		task.redirectErrorStream(true); // Channel errors to stdOut.
		task.redirectInput(Redirect.INHERIT);
		
		try {
			Process proc = task.start();
			BufferedReader input = new BufferedReader (new InputStreamReader( proc.getInputStream()));
			String line;
			while ((line = input.readLine ()) != null) {
				lines.add(line);
			}
			input.close();
			proc.waitFor();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		Map<String, String> locks = new HashMap<>();
		
		String currentPid = null;
		for(String line : lines) {
			if(line == null || line.trim().length() == 0) {
				continue;
			}
			if(line.startsWith("p")) {
				currentPid = line.substring(1);
			} else if(line.startsWith("n")) {
				locks.put(line.substring(1), currentPid);
			}
		}
		
		return locks;
	}