private String[] buildEnvironmentVariables() {
		String pathValue = getLibraryPathVariable("PATH", "");
		String ldLibraryPathValue = getLibraryPathVariable("LD_LIBRARY_PATH", "");

		List<String> argList = new ArrayList<>();
		Map<String, String> env = System.getenv();
		Set<Entry<String, String>> entrySet = env.entrySet();
		for (Entry<String, String> entry : entrySet) {
			if (entry.getKey().equalsIgnoreCase("PATH")) {
				// add our value to the current value
				pathValue = getLibraryPathVariable(entry.getKey(), entry.getValue());
			}
			else if (entry.getKey().equalsIgnoreCase("LD_LIBRARY_PATH")) {
				// add our value to the current value
				ldLibraryPathValue = getLibraryPathVariable(entry.getKey(), entry.getValue());
			}
			else {
				argList.add(entry.getKey() + "=" + entry.getValue());
			}
		}

		// adjust our paths to find custom libraries
		argList.add(pathValue);// for Windows
		argList.add(ldLibraryPathValue);// for Linux

		return argList.toArray(new String[argList.size()]);
	}
Sends a command to the DMG server process.
<p>
ExpectedResults can be positive (ie. N result lines will be read from the
server process),
<li>0 (no result lines will be read),
<li>{@link Cmd#UNKNOWN_RESPONSE_COUNT UNKNOWN_RESPONSE_COUNT} const value
that indicates that the first response from the command will be the
number of following lines,
<li>or negative, meaning that an variable number of responses of size
abs(N) will be read from the server, where the first response from the
command is the variable number. In all, abs(N) * (first_response_int)
will be the total number of result lines returned.

@param cmdStr
@param expectedResults
@return
@throws IOException
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgServerProcessManager.java