[ANN] win32-process 0.1.0 (or, fork for Windows)

D

Daniel Berger

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
 
G

gabriele renzi

il 19 Feb 2004 20:58:40 -0800, (e-mail address removed) (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..)
 
D

Daniel Berger

gabriele renzi said:
il 19 Feb 2004 20:58:40 -0800, (e-mail address removed) (Daniel Berger) ha
scritto::


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top