Skip to content

Bug Report: ksu.spawn fails to function correctly #90

Description

@xiliuya

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"
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions