I've just received this message from cron.
The chunk of code surrounding line 52 is:
42 #
43 # Note that this is both a method of module Timeout, so you can 'include
44 # Timeout' into your classes so they have a #timeout method, as well as a
45 # module method, so you can call it directly as Timeout.timeout().
46
47 def timeout(sec, exception=Error)
48 return yield if sec == nil or sec.zero?
49 raise ThreadError, "timeout within critical session" if Thread.critical
50 begin
51 x = Thread.current
52 y = Thread.start {
53 sleep sec
54 x.raise exception, "execution expired" if x.alive?
55 }
56 yield sec
57 # return true
58 ensure
59 y.kill if y and y.alive?
60 end
61 end
62
Hugh
---------- Forwarded message ----------
Date: Tue, 13 Mar 2007 18:12:02 +0000
From: "Hugh Sasse, Staff, Elec Eng" <hgs / dmu.ac.uk>
To: hgs / dmu.ac.uk
Subject: Output from "cron" command
Your "cron" job on brains
/usr/local/bin/erb /home/hgs/public_html/ruby/ruby_sites.eruby > /home/hgs/public_html/ruby/ruby_sites.html
produced the following output:
/usr/local/lib/ruby/1.8/timeout.rb:52: [BUG] Segmentation fault
ruby 1.8.6 (2007-03-13) [sparc-solaris2.9]
Abort - core dumped