diff options
author | Vasiliy Ermolovich <younash@gmail.com> | 2011-12-22 08:43:42 +0300 |
---|---|---|
committer | Vasiliy Ermolovich <younash@gmail.com> | 2011-12-22 08:43:42 +0300 |
commit | 7bfaa979e4e48dea68023e1aa67eabd160c3a7d3 (patch) | |
tree | 6ed040d81478b837b43286c386637fe95b4a0618 /activesupport/lib/active_support/core_ext/process | |
parent | 401b266f5fc1e6c5f13feb36122a1983989d8f58 (diff) | |
download | rails-7bfaa979e4e48dea68023e1aa67eabd160c3a7d3.tar.gz rails-7bfaa979e4e48dea68023e1aa67eabd160c3a7d3.tar.bz2 rails-7bfaa979e4e48dea68023e1aa67eabd160c3a7d3.zip |
remove Proces.daemon from core_ext
Diffstat (limited to 'activesupport/lib/active_support/core_ext/process')
-rw-r--r-- | activesupport/lib/active_support/core_ext/process/daemon.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/activesupport/lib/active_support/core_ext/process/daemon.rb b/activesupport/lib/active_support/core_ext/process/daemon.rb deleted file mode 100644 index f5202ddee4..0000000000 --- a/activesupport/lib/active_support/core_ext/process/daemon.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Process - def self.daemon(nochdir = nil, noclose = nil) - exit if fork # Parent exits, child continues. - Process.setsid # Become session leader. - exit if fork # Zap session leader. See [1]. - - unless nochdir - Dir.chdir "/" # Release old working directory. - end - - File.umask 0000 # Ensure sensible umask. Adjust as needed. - - unless noclose - STDIN.reopen "/dev/null" # Free file descriptors and - STDOUT.reopen "/dev/null", "a" # point them somewhere sensible. - STDERR.reopen '/dev/null', 'a' - end - - trap("TERM") { exit } - - return 0 - end unless respond_to?(:daemon) -end |