From: "mame (Yusuke Endoh)" Date: 2012-11-24T14:15:40+09:00 Subject: [ruby-core:50015] [ruby-trunk - Feature #5945] Add the ability to mark a at_exit as process-local. Issue #5945 has been updated by mame (Yusuke Endoh). Target version changed from 1.9.3 to next minor ---------------------------------------- Feature #5945: Add the ability to mark a at_exit as process-local. https://bugs.ruby-lang.org/issues/5945#change-33789 Author: robertgleeson (Robert Gleeson) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: next minor I'd like to propose a enhancement to at_exit. It would be nice if you could stop a at_exit handler from running in subprocesses. You can do this manually with this code: parent = Process.pid at_exit do if parent == Process.pid # ��� end end You can also do it by bypassing handlers: at_exit do # ��� end fork do exit! end But it would be nice if I could do: at_exit(false) do # ��� end The first approach is kind of ugly, and the second approach isn't sustainable if code outside your control can fork(���) without calling exit!. -- http://bugs.ruby-lang.org/