#!/usr/bin/ruby # System fork fork do puts "In child, pid = #$$" exit 99 end pid = Process.wait puts "Child terminated, pid = #{pid}, exit code = #{$? >> 8}"
Ruby Справочник v0.05 © 2007-2024 Igor Salnikov aka SunDoctor