الصنف SignalException
في روبي
< Ruby
اذهب إلى التنقل
اذهب إلى البحث
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
يًطللق الاستثناء SignalException
عند تلقي إشارة ما.
begin
Process.kill('HUP',Process.pid)
sleep # wait for receiver to handle signal sent by Process.kill
rescue SignalException => e
puts "received Exception #{e}"
end
سيُنتج عن تنفيذ هذه الشيفرة ما يلي:
received Exception SIGHUP
توابع الصنف العامة
new
ينشئ كائنًا جديدًا من النوع SignalException
.
توابع النسخة العامة
signo
يعيد رقم إشارة.