[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?

Austin Ziegler

9/19/2003 5:31:00 PM

On Sat, 20 Sep 2003 01:50:32 +0900, walter@mwsewall.com wrote:
> I am running windows 2000 using the PragProgs install.
>
>
> I have tried fork but get an unimplemented on this machine error. I have
> tried this on multiple windows 2000 machines and get the same error.

I believe that Windows doesn't support fork().

-austin
--
austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2003.09.19
* 13.30.37



3 Answers

Robert Klemme

9/22/2003 12:12:00 PM

0


"Austin Ziegler" <austin@halostatue.ca> schrieb im Newsbeitrag
news:2003919133052.522296@PADD...
> On Sat, 20 Sep 2003 01:50:32 +0900, walter@mwsewall.com wrote:
> > I am running windows 2000 using the PragProgs install.
> >
> >
> > I have tried fork but get an unimplemented on this machine error. I
have
> > tried this on multiple windows 2000 machines and get the same error.
>
> I believe that Windows doesn''t support fork().

I know there''s a problem with popen() but AFAIK fork() does work on
Windows. The attached script produced expected output with ruby on
cygwin:

13:58:35 [ruby]: ruby -w forks.rb
1.8.0
Testing: /bin/ls
CHILD 2228
forks.rb:23: warning: Insecure world writable dir /cygdrive/c, mode 040777
blah.rb extract.rb.bak forks.rb.bak fw.rb.bak ip.rb.bak
client.rb fact.rb fw-http.rb garble.rb junctions.rb
client.rb.bak fact.rb.bak fw-http.rb.bak garble.rb.bak
junctions.rb.bak
extract.rb forks.rb fw.rb ip.rb keynames.txt
FINISH 2032 - 2228
Testing: /bin/sleep 1000
CHILD 2692
forks.rb:23: warning: Insecure world writable dir /cygdrive/c, mode 040777
TIMEOUT
13:58:46 [ruby]:

Regards

robert

walter

9/22/2003 1:33:00 PM

0

>
> # I know there''s a problem with popen() but AFAIK fork() does work on
> # Windows. The attached script produced expected output with ruby on
> # cygwin:
> #
> <snip>
>
> I''m taking a stab in the dark here, but might this be because Cygwin
> supplies fork()?
>
> Chad


It appears that cygwin does supply form, but it is not part of the
standard Windows install.

I just wanted to thank everyone for all of your input. At least I
know I have not missed something stupid.

Walt


*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO. email : walter@mwsewall.com
259 Front St. Phone : (207) 442-7994 x 128
Bath, ME 04530 Fax : (207) 443-6284
*****************************************************


Robert Klemme

9/22/2003 1:46:00 PM

0


<walter@mwsewall.com> schrieb im Newsbeitrag
news:3F6EC1BC.22827.27FE3C@localhost...
> >
> > # I know there''s a problem with popen() but AFAIK fork() does work on
> > # Windows. The attached script produced expected output with ruby on
> > # cygwin:
> > #
> > <snip>
> >
> > I''m taking a stab in the dark here, but might this be because Cygwin
> > supplies fork()?

Well, yes. Obviously Windows does support fork functionality without
having the exact same function in its stdlib.

popen is different since AFAIK you can''t multiplex pipes on Windows (2nd
hand info here, I think it was from Nobu Nakada) so the basic
functionality seems to be lacking.

> It appears that cygwin does supply form, but it is not part of the
> standard Windows install.

True.

> I just wanted to thank everyone for all of your input. At least I
> know I have not missed something stupid.

You didn''t. And you''re welcome.

Regards

robert