Repository: godotengine/godot
File: core/bind/core_bind.cpp (C++)

Code before:
	return OS::get_singleton()->is_in_low_processor_usage_mode();
}

void _OS::set_low_processor_usage_mode_sleep_usec(int p_usec) {
	OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(p_usec);
}

int _OS::get_low_processor_usage_mode_sleep_usec() const {
	return OS::get_singleton()->get_low_processor_usage_mode_sleep_usec();
}

String _OS::get_executable_path() const {
	return OS::get_singleton()->get_executable_path();
}

Error _OS::shell_open(String p_uri) {
	if (p_uri.begins_with("res://")) {
		WARN_PRINT("Attempting to open an URL with the \"res://\" protocol. Use `ProjectSettings.globalize_path()` to convert a Godot-specific path to a system path before opening it with `OS.shell_open()`.");
	} else if (p_uri.begins_with("user://")) {
		WARN_PRINT("Attempting to open an URL with the \"user://\" protocol. Use `ProjectSettings.globalize_path()` to convert a Godot-specific path to a system path before opening it with `OS.shell_open()`.");
	}
	return OS::get_singleton()->shell_open(p_uri);
};

int _OS::execute(const String &p_path, const Vector<String> &p_arguments, bool p_blocking, Array p_output, bool p_read_stderr, bool p_open_console) {
	OS::ProcessID pid = -2;
	int exitcode = 0;
	List<String> args;
	for (int i = 0; i < p_arguments.size(); i++) {
		args.push_back(p_arguments[i]);
	}
	String pipe;
	Error err = OS::get_singleton()->execute(p_path, args, p_blocking, &pid, &pipe, &exitcode, p_read_stderr, nullptr, p_open_console);
	p_output.clear();
	p_output.push_back(pipe);
	if (err != OK) {
		return -1;
	} else if (p_blocking) {
		return exitcode;
	} else {
		return pid;
	}
}

Error _OS::kill(int p_pid) {
	return OS::get_singleton()->kill(p_pid);
}

bool _OS::is_process_running(int p_pid) const {
	return OS::get_singleton()->is_process_running(p_pid);
}

Review comment (suggestion):
```suggestion
	return OS::get_singleton()->get_stdin_string(p_block);
```

But probably the argument should be removed at all (from both CoreBind and OS), it's not useful, setting it to `false` always return empty string.

Code after:
	return OS::get_singleton()->is_in_low_processor_usage_mode();
}

void _OS::set_low_processor_usage_mode_sleep_usec(int p_usec) {
	OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(p_usec);
}

int _OS::get_low_processor_usage_mode_sleep_usec() const {
	return OS::get_singleton()->get_low_processor_usage_mode_sleep_usec();
}

String _OS::get_executable_path() const {
	return OS::get_singleton()->get_executable_path();
}

Error _OS::shell_open(String p_uri) {
	if (p_uri.begins_with("res://")) {
		WARN_PRINT("Attempting to open an URL with the \"res://\" protocol. Use `ProjectSettings.globalize_path()` to convert a Godot-specific path to a system path before opening it with `OS.shell_open()`.");
	} else if (p_uri.begins_with("user://")) {
		WARN_PRINT("Attempting to open an URL with the \"user://\" protocol. Use `ProjectSettings.globalize_path()` to convert a Godot-specific path to a system path before opening it with `OS.shell_open()`.");
	}
	return OS::get_singleton()->shell_open(p_uri);
};

String _OS::read_string_from_stdin() {
	return OS::get_singleton()->get_stdin_string();
}

int _OS::execute(const String &p_path, const Vector<String> &p_arguments, bool p_blocking, Array p_output, bool p_read_stderr, bool p_open_console) {
	OS::ProcessID pid = -2;
	int exitcode = 0;
	List<String> args;
	for (int i = 0; i < p_arguments.size(); i++) {
		args.push_back(p_arguments[i]);
	}
	String pipe;
	Error err = OS::get_singleton()->execute(p_path, args, p_blocking, &pid, &pipe, &exitcode, p_read_stderr, nullptr, p_open_console);
	p_output.clear();
	p_output.push_back(pipe);
	if (err != OK) {
		return -1;
	} else if (p_blocking) {
		return exitcode;
	} else {
		return pid;
	}
}

Error _OS::kill(int p_pid) {
	return OS::get_singleton()->kill(p_pid);
}