Skip to main content

createSpawnHandler

Callable

  • createSpawnHandler(program: (command: string[], processApi: ProcessApi, options: ProcessOptions) => void | Promise<void>): any

  • Usage:

    php.setSpawnHandler(
    createSpawnHandler(function (command, processApi) {
    console.log(processApi.flushStdin());
    processApi.stdout('/\n/tmp\n/home');
    processApi.exit(0);
    })
    );

    Parameters

    • program: (command: string[], processApi: ProcessApi, options: ProcessOptions) => void | Promise<void>

    Returns any