RAGS - v1.10.0
    Preparing search index...

    Function 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);
      });
    • 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);
      });