the ebuilds for app-shells/ksh used to work fine, but now they fail with the new sandbox code. a script called `package` is used to do most of the building (they dont use gnu make), which is a shell script that doesnt start with sh_bang. if the kernel returns ENOEXEC when attempting to execute a executable file (fs/binfmt_script.c), bash will try to run it as a shell script (execute_cmd.c). This is the behaviour described in the single unix specification, http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_009_001_001 "...If the execve() function fails due to an error equivalent to the XSH specification error [ENOEXEC], the shell will execute a command equivalent to having a shell invoked with the command name as its first operand, along with any remaining arguments passed along. If the executable file is not a text file, the shell may bypass this command execution, write an error message, and return an exit status of 126." So, imho, this should work. But, if you guys decide not to fix it, i'll just make a patch to add the sh_bangs :) verify by making an ebuild with a src_unpack like this: src_unpack() { #echo '#!/bin/sh' > ${T}/test echo 'echo hello' >> ${T}/test chmod 755 ${T}/test ${T}/test || die } which should dump core, uncomment the first line and it works fine.
We've been aware of this bug for quite some time. Thanks for your comments though as they helped me to confirm my fix. *** This bug has been marked as a duplicate of 46945 ***