PHP 8.2.31
Preview: fork.rb Size: 557 B
/proc/thread-self/root/opt/alt/ruby19/lib64/ruby/1.9.1/irb/cmd/fork.rb

#
#   fork.rb -
#   	$Release Version: 0.9.6 $
#   	$Revision: 27967 $
#   	by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#

@RCS_ID='-$Id: fork.rb 27967 2010-05-23 08:48:44Z nobu $-'


module IRB
  module ExtendCommand
    class Fork<Nop
      def execute(&block)
	pid = send ExtendCommand.irb_original_method_name("fork")
	unless pid
	  class << self
	    alias_method :exit, ExtendCommand.irb_original_method_name('exit')
	  end
	  if iterator?
	    begin
	      yield
	    ensure
	      exit
	    end
	  end
	end
	pid
      end
    end
  end
end


Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
462 B lrw-r--r-- 2009-10-02 12:04:37
Edit Download
557 B lrw-r--r-- 2010-05-23 08:48:44
Edit Download
639 B lrw-r--r-- 2011-06-29 13:51:30
Edit Download
1.10 KB lrw-r--r-- 2009-10-02 12:04:37
Edit Download
526 B lrw-r--r-- 2009-10-02 12:04:37
Edit Download
586 B lrw-r--r-- 2009-10-02 12:04:37
Edit Download
571 B lrw-r--r-- 2009-10-02 12:04:37
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).