Sy Ali wrote:
> This always fails.
> 
> Dir.chroot(Dir.pwd)
> Kernel.system('echo "new file" > foo')
> Kernel.system('rm -f bar')
> Kernel.system('mv -f foo bar')
> if File.exists?("bar") == true then puts "PASS" else puts "FAIL" end
> 
> It's the chroot which is causing the problem.  What's the problem?
> 

Hi Sy,

When you chroot to an area on the file system, that area/ 
directory becomes the root for the remainder of the process 
life.  If rm and mv are not available in the PATH relative 
to the new root, then you'd have problems (i.e. the system
commands you're executing are not available).

Could this be it?  You could check by verifying the return 
value of the various calls to Kernel.system, no?

Good luck.


Andy