From: Benedikt Heinen Date: 2006-10-13T23:52:47+09:00 Subject: Re: Why does 'chroot' interfere with 'system'? On Fri, 13 Oct 2006, Martin Coxall wrote: > However, if you take only the first two lines: > > Dir.chroot(Dir.pwd) > Kernel.system('echo "new file" > foo') > > I'd expect that to work, because 'echo' is a builtin on most shells. > But it doesn't, not on a random debian box I just tried. I don't > understand that. Well, it's true and it's not... Yes, echo is a builtin in pretty much every shell... However, if you do Kernel.system, this won't tell your shell to use its builtin function - but it will try to run an executable call echo, which normally is /bin/echo... Your shell is not involved in calls to system(); the built-in will only be used while actually IN the shell. Benedikt ALLIANCE, n. In international politics, the union of two thieves who have their hands so deeply inserted in each other's pockets that they cannot separately plunder a third. (Ambrose Bierce, The Devil's Dictionary)