* Jim Freeze (jfreeze / freebsdportal.com) wrote:
> On Wed, Jul 24, 2002 at 10:59:15PM +0900, ts wrote:
> > >>>>> "J" == Jim Freeze <jfreeze / freebsdportal.com> writes:
> > 
> > >> job.pid = Process.fork { redirect(job) }
> > 
> >    job is created in a process
> > 
> > >> def redirect(job)
> > >> job.result = system(job.cmd)   #=> job.result has a value here
> > 
> >    you modify `job' in *another* process
> > 
> > >> job.result                      #=> job.result is empty. Why?
> > 
> >    you retrieve the value that was assigned in the initial process
> > 
> >    `job' is not a shared variable
> > 
> Another question. Do you know of a simple way to propagate data back
> to the original process?

Sure, spit out the data on stdout and have the parent read it back in :)

Tom.
-- 
   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | http://linuxbrit.co.uk |
 /(   )\  | Open Source/UNIX consultant  | tom / linuxbrit.co.uk    |
  ^^-^^   `-------------------------------------------------------'