[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: fork not available?

Berger, Daniel

9/19/2003 6:23:00 PM

> -----Original Message-----
> From: Austin Ziegler [mailto:austin@halostatue.ca]
> Sent: Friday, September 19, 2003 12:10 PM
> To: ruby-talk@ruby-lang.org
> Subject: Re: fork not available?
>
>
> On Sat, 20 Sep 2003 02:26:15 +0900, walter@mwsewall.com wrote:
> > Ok so I sent this out a bit too early.
> >
> >
> > after looking in the archives some more I see that fork and
> popen("-
> > ") do not work with Windows. I see ri does mention that
> IO.popen is
> > Not available on all platforms, but it does not mention this for
> > Kernel.fork.

I'd like to see fork() emulated someday in Ruby on Win32. Here's a link
from the ActiveState web site that explains how they emulated fork in their
Perl distro:

http://aspn.activestate.com/ASPN/docs/ActivePerl/lib/Pod/per...

Here's a general porting guide from the MSDN web site that discusses (among
other things) how to port fork calls:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/d...
/ucmgch08.asp

Regards,

Dan

6 Answers

gabriele renzi

9/19/2003 8:05:00 PM

0

il Sat, 20 Sep 2003 03:22:57 +0900, "Berger, Daniel"
<djberge@qwest.com> ha scritto::

>> -----Original Message-----
>> From: Austin Ziegler [mailto:austin@halostatue.ca]
>> Sent: Friday, September 19, 2003 12:10 PM
>> To: ruby-talk@ruby-lang.org
>> Subject: Re: fork not available?
>>
>>
>> On Sat, 20 Sep 2003 02:26:15 +0900, walter@mwsewall.com wrote:
>> > Ok so I sent this out a bit too early.
>> >
>> >
>> > after looking in the archives some more I see that fork and
>> popen("-
>> > ") do not work with Windows. I see ri does mention that
>> IO.popen is
>> > Not available on all platforms, but it does not mention this for
>> > Kernel.fork.
>
>I''d like to see fork() emulated someday in Ruby on Win32. Here''s a link
>from the ActiveState web site that explains how they emulated fork in their
>Perl distro:
>

my 2c:
actually, I think most of the fork() usage is related to two use case:

1) fork()+exec()
2) fork() and subtask

I think the first problem could be addressed by a Process.spawn()
method, that can be easyli emulated on windows with a
createThread()+createProcess()
The second.. well, someway I think it could be ''translated'' in one
like the first, even if little hackish, anyway fixing #1 would be a
good add to ruby, imo.

Tim Hammerquist

9/19/2003 11:01:00 PM

0

Berger, Daniel graced us by uttering:
> I''d like to see fork() emulated someday in Ruby on Win32.
> Here''s a link from the ActiveState web site that explains how
> they emulated fork in their Perl distro:
>
> http://aspn.activestate.com/ASPN/docs/ActivePerl/lib/Pod/per...

I noticed an interesting paragraph from that page (and your local
Perl docs, if any):

| Support for concurrent interpreters and the fork() emulation
| was implemented by ActiveState, with funding from Microsoft
| Corporation.

This show that, as much as M$ might prefer their own languages to
dominate, they can''t deny the Perl market and are willing to, in
small or large part, support it at a personal loss. The
pseudo-fork code for Perl is, of course, available with the rest
of the Perl source under the free (beer+speech) Artistic
License...

Of course it also shows us that all we''d need to have a third
party develop the Ruby+Win32 forking is to prove that ActiveState
can make enough money on commercial licenses by developing and
releasing ActiveRuby(TM) binaries...

Tim Hammerquist
--
Creativity is allowing yourself to make mistakes.
Art is knowing which ones to keep.
-- Scott Adams

gabriele renzi

9/19/2003 11:41:00 PM

0

il 19 Sep 2003 16:01:28 -0700, Tim Hammerquist <tim@vegeta.ath.cx> ha
scritto::


>
>This show that, as much as M$ might prefer their own languages to
>dominate, they can''t deny the Perl market and are willing to, in
>small or large part, support it at a personal loss. The
>pseudo-fork code for Perl is, of course, available with the rest
>of the Perl source under the free (beer+speech) Artistic
>License...

I think MS is alwys been a perl supporter.
you can even see that themself use perl:
http://www.microsoft.com/downloads/details.aspx?FamilyId=3A1C93FA-7462-47D0-8E56-8DD34C6292F0&disp...

Tim Hammerquist

9/20/2003 1:55:00 AM

0

gabriele renzi graced us by uttering:
> tim hammerquist <tim@vegeta.ath.cx> ha scritto::
> > This show that, as much as M$ might prefer their own
> > languages to dominate, they can''t deny the Perl market and
> > are willing to, in small or large part, support it at a
> > personal loss. The pseudo-fork code for Perl is, of course,
> > available with the rest of the Perl source under the free
> > (beer+speech) Artistic License...
>
> I think MS is alwys been a perl supporter. you can even see
> that themself use perl:

There was a great article about 5 years ago that talked about
individual MS engineers insisting on using Perl internally.

However, at my work (a major slot machine developer and
manufacturer), several engineers use Linux but the company does
not "support" Linux or any form of OSS, nor does it have any
official stance on them.

Thus, I don''t think MS''s use of secondary use Perl indicates
"support" of Perl, but I do believe their financial investment in
the development of Perl should be considered supporting.

My USD$0.02,
Tim Hammerquist
--
I have never let my schooling interfere with my education.
-- Mark Twain

gabriele renzi

9/20/2003 9:06:00 AM

0

il 19 Sep 2003 18:54:41 -0700, Tim Hammerquist <tim@vegeta.ath.cx> ha
scritto::


>> I think MS is alwys been a perl supporter. you can even see
>> that themself use perl:

<snip>

>Thus, I don''t think MS''s use of secondary use Perl indicates
>"support" of Perl, but I do believe their financial investment in
>the development of Perl should be considered supporting.

oops, sorry I was thinking of ''supporter'' as in ''fan''
(and I mean ''fan as in ''football'' or ''basket'') :)



Chris Morris

9/20/2003 2:26:00 PM

0

Berger, Daniel wrote:

>I''d like to see fork() emulated someday in Ruby on Win32. Here''s a link
>from the ActiveState web site that explains how they emulated fork in their
>Perl distro:
>
I chased this down about 18 months ago. Here''s a post to the list about
it: http://ruby-talk...

The info may be old, but essentially the Perl fork support wasn''t
working that well.

--
Chris
http://clabs....