circu.js
    Preparing search index...

    Interface ChildProcess<PTY>

    Child process object

    interface ChildProcess<PTY = false> {
        ipc: CModuleStreams.Pipe | null;
        pid: number;
        readable: PTY extends true ? CModuleStreams.Pipe : undefined;
        stderr: PTY extends true ? undefined : CModuleStreams.Pipe;
        stdin: PTY extends true ? undefined : CModuleStreams.Pipe;
        stdout: PTY extends true ? undefined : CModuleStreams.Pipe;
        writable: PTY extends true ? CModuleStreams.Pipe : undefined;
        get size(): PTY extends true ? WinSize : never;
        kill(signal?: number | Signal): void;
        resize(cols: number, rows: number): PTY extends true ? void : never;
        wait(): Promise<ExitInfo>;
        waitSync(): ExitInfo;
    }

    Type Parameters

    • PTY = false
    Index

    Properties

    ipc: CModuleStreams.Pipe | null

    IPC pipe (non-PTY mode only, undefined in PTY mode) Used for inter-process communication

    pid: number

    Process ID

    readable: PTY extends true ? CModuleStreams.Pipe : undefined

    PTY readable stream (PTY mode only, undefined in non-PTY mode) On Linux, same object as writable

    stderr: PTY extends true ? undefined : CModuleStreams.Pipe

    Stderr stream (non-PTY mode only, undefined in PTY mode)

    stdin: PTY extends true ? undefined : CModuleStreams.Pipe

    Stdin stream (non-PTY mode only, undefined in PTY mode)

    stdout: PTY extends true ? undefined : CModuleStreams.Pipe

    Stdout stream (non-PTY mode only, undefined in PTY mode)

    writable: PTY extends true ? CModuleStreams.Pipe : undefined

    PTY writable stream (PTY mode only, undefined in non-PTY mode) On Linux, same object as readable

    Accessors

    • get size(): PTY extends true ? WinSize : never

      Get PTY window size (PTY mode only)

      Returns PTY extends true ? WinSize : never

      Window size object with cols, rows, xpixel, ypixel

    Methods

    • Send signal to process

      Parameters

      • Optionalsignal: number | Signal

        Signal to send (default SIGTERM, can be string or number)

      Returns void

    • Resize PTY window (PTY mode only)

      Parameters

      • cols: number

        Columns

      • rows: number

        Rows

      Returns PTY extends true ? void : never

    • Wait for process exit

      Returns Promise<ExitInfo>

      Exit code and termination signal

    • Block wait for process exit

      Returns ExitInfo

      Exit code and termination signal