MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / create_process

Method create_process

platform/web/os_web.cpp:118–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118Error OS_Web::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
119 Array args;
120 for (const String &E : p_arguments) {
121 args.push_back(E);
122 }
123 String json_args = Variant(args).to_json_string();
124 int failed = godot_js_os_execute(json_args.utf8().get_data());
125 ERR_FAIL_COND_V_MSG(failed, ERR_UNAVAILABLE, "OS::execute() or create_process() must be implemented in Web via 'engine.setOnExecute' if required.");
126 return OK;
127}
128
129Error OS_Web::kill(const ProcessID &p_pid) {
130 ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "OS::kill() is not available on the Web platform.");

Callers

nothing calls this directly

Calls 5

to_json_stringMethod · 0.80
VariantClass · 0.50
push_backMethod · 0.45
get_dataMethod · 0.45
utf8Method · 0.45

Tested by

no test coverage detected