Date: Fri, 10 Jun 2005 15:32:27 +0400 From: Wartan Hachaturow <wartan.hachaturow@gmail.com> To: Garance A Drosihn <drosih@rpi.edu> Cc: freebsd-standards@freebsd.org Subject: Re: Change the executing of a 0-byte file to be an error... Message-ID: <4aaa2e1c0506100432117ea3b8@mail.gmail.com> In-Reply-To: <p06210260beced2897aba@128.113.24.47> References: <p06210260beced2897aba@128.113.24.47>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/10/05, Garance A Drosihn <drosih@rpi.edu> wrote: > error? I read through a few likely pages in SUSv3, and it looked > like the behavior for executing an 0-byte file is not explicitly > defined. Of course, it might be that I was simply looking in the > wrong part of the standard. To quote SUSv3's Shell and Utilities: "If the execve() function fails due to an error equivalent to the [ENOEXEC] error defined in the System Interfaces volume of IEEE Std 1003.1-2001, the shell shall execute a command equivalent to having a shell invoked with the command name as its first operand, with any remaining arguments passed to the new shell. If the executable file is not a text file, the shell may bypass this command execution. In this case, it shall write an error message, and shall return an exit status of 126." So it is merely an empty script execution. The kernel reports a failure, as= it should. --=20 Regards, Wartan.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4aaa2e1c0506100432117ea3b8>