Hi all,
I am very pleased to announce the release of win32-process 0.1.0.
Many thanks go to Park Heesob for his work on this one.
What is it?
···
===========
This package provides fork, wait, wait2, waitpid and waitpid2 for
Win32 systems. It also provides an alternative kill method.
How was this accomplished?
See the docs and code for more details. Short answer:
CreateProcess(“ruby $0”)
Where can I get it?
It’s on the RAA. You can also find it on the project page at
http://rubyforge.org/projects/win32utils.
Quick Example:
require 'win32/process’
include Win32
In the child, using block form
Win32::Process.fork do
7.times { |i|
puts "Child: #{i}"
sleep 1
}
end
Back in the parent
4.times{ |i|
puts "Parent: #{i}"
sleep 1
}
Win32::Process.wait
puts “Continuing on…”
Feedback welcome.
Enjoy!
The Win32 Utils Team
wow, this is cool, thanks
BTW, I wonder if you considered the ability to do something like
including Win32 if RUBY_PLATFORM=~/win/
I mean, override standard Process module. Does this break something ?
(I don’t think so, but…)
···
il 19 Feb 2004 20:58:40 -0800, djberg96@hotmail.com (Daniel Berger) ha scritto::
Hi all,
I am very pleased to announce the release of win32-process 0.1.0.
Many thanks go to Park Heesob for his work on this one.
gabriele renzi surrender_it@remove.yahoo.it wrote in message news:atdb30dqp98jm055ljtl56tbo31m86h1j3@4ax.com…
il 19 Feb 2004 20:58:40 -0800, djberg96@hotmail.com (Daniel Berger) ha
scritto::
Hi all,
I am very pleased to announce the release of win32-process 0.1.0.
Many thanks go to Park Heesob for his work on this one.
wow, this is cool, thanks
BTW, I wonder if you considered the ability to do something like
including Win32 if RUBY_PLATFORM=~/win/
I mean, override standard Process module. Does this break something ?
(I don’t think so, but…)
It’s possible. You can do this by hand by modifying the extconf.rb
file slightly as well as the process.c file - just change the
definitions for cProcess and cProcessError so that they’re part of the
Process class or, if you prefer, Kernel.
Perhaps we’ll modify the install procedure to give folks that option.
Regards,
Dan