make linenoiseEdit read resilient to signal

Read in a loop and allow retry if read was interrupted by a signal.