RAGS - v1.10.0
    Preparing search index...

    Variable subprocess

    subprocess: {
        (args: Args<void, void> & { bind?: Widget }): Subprocess;
        (
            cmd: string | string[],
            out?: (stdout: string) => void,
            err?: (stderr: string) => void,
            bind?: Widget,
        ): Subprocess;
    }

    Type Declaration

      • (args: Args<void, void> & { bind?: Widget }): Subprocess
      • Launches a long-running subprocess and streams its stdout/stderr.

        Returns a Gio.Subprocess augmented with write() and writeAsync() methods for sending data to the subprocess's stdin.

        Parameters

        • args: Args<void, void> & { bind?: Widget }

        Returns Subprocess

        The subprocess instance

        const proc = subprocess('tail -f /tmp/log', line => {
        console.log('new line:', line);
        });
      • (
            cmd: string | string[],
            out?: (stdout: string) => void,
            err?: (stderr: string) => void,
            bind?: Widget,
        ): Subprocess
      • Launches a long-running subprocess and streams its stdout/stderr.

        Returns a Gio.Subprocess augmented with write() and writeAsync() methods for sending data to the subprocess's stdin.

        Parameters

        • cmd: string | string[]
        • Optionalout: (stdout: string) => void
        • Optionalerr: (stderr: string) => void
        • Optionalbind: Widget

        Returns Subprocess

        The subprocess instance

        const proc = subprocess('tail -f /tmp/log', line => {
        console.log('new line:', line);
        });