ts wrote:
>>>>>>"B" == Bauduin Raphael <rb / raphinou.com> writes:
> 
> 
> B> for f in "/mnt/test-chroot/"  "/mnt/test-chroot/"; do chroot $f ls -a 
> B> /mnt; done
> 
>  chroot(1) is an user command
> 

yes. Take this as what I want to duplicate in "pure" Ruby.

> B> Having just read that continuations saved the whole context when it is
> B> created, I thought to use it, but it doesn't work (script below chroots
> B> correctly the first time, but not the second).
> 
>  What do you call a context ?
> 
>  I hope that you don't expect that this work 
> 
> svg% cat b.rb
> #!/usr/bin/ruby
> ["b.rb", "b.rb"].each do |file|
>    callcc {|cc|
>       File.unlink(file)
>       cc.call
>    }
> end
> 
> svg% 
> 
>  :-)

hehe, no, I wasn't hoping this would work :-)


> 
> B> Is what I am trying to do possible?
> 
>  use Kernel#fork, with Process::wait and Dir::chdir, Dir::chroot
> 

I'll take a look to those, thanks.

Raph


> 
> Guy Decoux
> 
>