The ksu.spawn function fails to execute properly, resulting in an exit code of -1 or failing to capture and stream outputs correctly in the current environment.
Test in v438,
Run mode : magsik.
OS: Lineageos 23.2(android 16)
code:
globalThis.spawn_callback_test_123 = {
stdout: {
emit: function(event, data) {
console.log("Kotlin stdout:", data);
}
},
stderr: {
emit: function(event, data) {
console.error("Kotlin stderr:", data);
}
},
emit: function(event, arg) {
console.log(`Kotlin event: ${event}, args:`, arg);
}
};
ksu.spawn(
"ls",
JSON.stringify(["-l", "/sdcard"]),
JSON.stringify({}),
"spawn_callback_test_123"
);
The
ksu.spawnfunction fails to execute properly, resulting in an exit code of-1or failing to capture and stream outputs correctly in the current environment.Test in v438,
Run mode : magsik.
OS: Lineageos 23.2(android 16)
code: