create_process unable to find executable after chroot
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3613
Reported by Thomas Bopp, Uni-GH Paderborn astra@upb.de
The following does not work. There is a test file with exec permissions /root/test and removing the chroot line will make it work. It also fails with any other combination of PATH, /root/test, cwd, etc.
void main()
{
mapping env = getenv();
System.chroot("/root");
env["PATH"] = "/:/root/";
mapping options = ([
"stdin":Stdio.stdin,
"stdout":Stdio.stdout,
"env": env,
]);
Process.create_process( ({ "test" }), options );
}