Method: FileDaemon::ClassMethods#after_fork
- Defined in:
- lib/file_daemon.rb
#after_fork ⇒ Object
Public: Reopen all file descriptors that have been stored through the before_fork hook.
Returns nothing.
39 40 41 42 43 44 45 46 47 |
# File 'lib/file_daemon.rb', line 39 def after_fork @files_to_reopen.each do |file| begin file.reopen file.path, "a+" file.sync = true rescue ::IOError # rubocop:disable HandleExceptions end end end |