• Wait for the process to stop or kill it after the timeout.

    Parameters

    • pid: number

      The process pid

    • timeout: number = 5000

      The maximum wait time in milliseconds

    Returns Promise<boolean>

    true if the process stopped, false if the process was killed.