Segmentation fault when a try to catch a InterruptException

Alvaro_M
Fri, 24 Feb 2017 20:02:11 +0000
General Usage

Hi,

I have this code, I’m trying to catch a keyboard interrupt, but what a get it a segmentation fault

try
  for i in 1:10
    println(i)
    sleep(0.5)
  end
catch err
   if isa(err, InterruptException)
     exit()
   end
   rethrow
end

Version 0.5.1-pre+55 (2017-02-13 09:11 UTC)
Commit 8d4ef37 (11 days old release-0.5)*
x86_64-linux-gnu

Regards.

Álvaro.

10 posts - 3 participants