>>>>> "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

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% 

 :-)

B> Is what I am trying to do possible?

 use Kernel#fork, with Process::wait and Dir::chdir, Dir::chroot


Guy Decoux