----- Original Message -----
From: Mathieu Bouchard <matju / cam.org>
To: ruby-talk ML <ruby-talk / netlab.co.jp>
Sent: Thursday, January 11, 2001 9:59 PM
Subject: [ruby-talk:9182] Re: "|" on front of aPortName


> > Same for the "|-" variant that spawns another Ruby
> > interpreter... how/why/when would you use this?
>
> The "|-" is mostly like popen(). One reason to use it is to be able to use
> OS-level sandboxing, like limiting a process size, chroot(), jail(),
> setuid(), etc. For untrusted code (unstable or malicious).
>
> Apart from that you can use it if you want to avoid Ruby's threading
> mechanism. For instance, Ruby's model is preemptive at the Ruby level, but
> cooperative at the C level (?). If you want to support several CPU's you
> have to fork. If you want to access C libraries that block, you have to
> fork. If you want the simplicity of having each object in exactly one
> thread, you fork.
>
> (That's my understanding of it.)
>
> matju
>

Hmm... I thought it could only be used for reading??? I don't see
aPortname referenced anywhere but IO.foreach, IO.readlines, and
IO#readlines...

Yet for the interpreter that can't make sense... ?

Hal