# HG changeset patch # User Mike Miller # Date 1506061633 25200 # Node ID 1909078be6c784de2c1d5f776b260c78dfbfd17d # Parent 0160a3199b2d66568f5a21b028a2f41ebd9a31aa pause: don't interrupt sleep on harmless signals (bug #52084) * utils.cc (octave_sleep): Continue calling nanosleep with time remaining when it is interrupted by a signal. diff -r 0160a3199b2d -r 1909078be6c7 libinterp/corefcn/utils.cc --- a/libinterp/corefcn/utils.cc Fri Sep 22 17:17:45 2017 -0400 +++ b/libinterp/corefcn/utils.cc Thu Sep 21 23:27:13 2017 -0700 @@ -1362,10 +1362,14 @@ : static_cast (seconds)); struct timespec delay = { sec, static_cast (fraction) }; - struct timespec remaining; - octave_nanosleep_wrapper (&delay, &remaining); + int status; - octave_quit (); + do + { + status = octave_nanosleep_wrapper (&delay, &delay); + octave_quit (); + } + while (status == -1 && errno == EINTR); } DEFUN (isindex, args, ,