Re: Misleading error when attempting to run foreign executable

2021-10-13 Thread Alex fxmbsw7 Ratchev
also enoexist with its description of the ld parser not available On Wed, Oct 13, 2021, 16:06 Andrea Monaco wrote: > > > [ENOENT] A component of path or file does not name an existing file > > or path or file is an empty string. > > > Then ENOENT is clearly not an appropriate error in this

Re: Misleading error when attempting to run foreign executable

2021-10-13 Thread Andrea Monaco
> [ENOENT] A component of path or file does not name an existing file > or path or file is an empty string. Then ENOENT is clearly not an appropriate error in this case. > [EINVAL] The new process image file has appropriate privileges and > has a recognized executable binary format,

Re: Misleading error when attempting to run foreign executable

2021-10-12 Thread Ángel
On 2021-10-12 at 00:48 +0700, Robert Elz wrote: > | When execve returns this error for what is a clearly invalid > reason, > > The problem is that sometimes it will probably be an invalid reason > (that's where the race conditions can matter, that the file was there > when it was checked

Re: Misleading error when attempting to run foreign executable

2021-10-11 Thread Eli Schwartz
On 10/11/21 07:09, Robert Elz wrote: > This is clearly an OS problem, not one in bash. > > POSIX says of ENOENT as it applies to the exec*() set of functions: > > [ENOENT] A component of path or file does not name an existing file > or path or file is an empty string. > > "path" and

Re: Misleading error when attempting to run foreign executable

2021-10-11 Thread Alex fxmbsw7 Ratchev
the mv a old new looks like it can be achieved by cgroups freeze [i only have hears so] and ye its not portable if choosen to somehow freeze it, i dunno, transparently somehow, for letting changes happen btw on my secondlast bash.git.devel build it ended up with some binary that also produced

Re: Misleading error when attempting to run foreign executable

2021-10-11 Thread Robert Elz
Date:Mon, 11 Oct 2021 11:00:54 -0400 From:Chet Ramey Message-ID: <45ecd950-9e9b-553b-132b-04d1dcfad...@case.edu> | When execve returns this error for what is a clearly invalid reason, The problem is that sometimes it will probably be an invalid reason (that's

Re: Misleading error when attempting to run foreign executable

2021-10-11 Thread Chet Ramey
On 10/11/21 7:09 AM, Robert Elz wrote: > Date:Sun, 10 Oct 2021 21:09:53 -0400 > From:Eli Schwartz > Message-ID: <4a362385-066d-0795-9a02-ff8bbb920...@archlinux.org> > > | So I wonder, if bash already in this exact case attempts to open() the > | file and read()

Re: Misleading error when attempting to run foreign executable

2021-10-11 Thread Robert Elz
Date:Sun, 10 Oct 2021 21:09:53 -0400 From:Eli Schwartz Message-ID: <4a362385-066d-0795-9a02-ff8bbb920...@archlinux.org> | So I wonder, if bash already in this exact case attempts to open() the | file and read() it to look for a shebang, what's the harm in

Re: Misleading error when attempting to run foreign executable

2021-10-10 Thread Dmitry Goncharov via Bug reports for the GNU Bourne Again SHell
On Sun, Oct 10, 2021 at 9:11 PM Eli Schwartz wrote: > So I wonder, if bash already in this exact case attempts to open() the > file and read() it to look for a shebang, what's the harm in assuming > (or checking) that it exists in this patch? i guess, you are right. i, on the other hand wonder,

Re: Misleading error when attempting to run foreign executable

2021-10-10 Thread Eli Schwartz
On 10/10/21 20:24, Dmitry Goncharov via Bug reports for the GNU Bourne Again SHell wrote: > On Sun, Oct 10, 2021 at 7:52 PM Ángel wrote: >> Looking at the code, it doesn't even need an extra stat(), it already >> knows the file exists > > Attempts to know ahead of time or check afterwards that

Re: Misleading error when attempting to run foreign executable

2021-10-10 Thread Dmitry Goncharov via Bug reports for the GNU Bourne Again SHell
On Sun, Oct 10, 2021 at 7:52 PM Ángel wrote: > Looking at the code, it doesn't even need an extra stat(), it already > knows the file exists Attempts to know ahead of time or check afterwards that the file exists are subject to a race condition. regards, Dmitry

Re: Misleading error when attempting to run foreign executable

2021-10-10 Thread Ángel
I agree with Ilkka and Alex: it would be helpful to show a different error message in this case. I know about ELF format and what leads to this, and it's still slightly confusing when faced to it. You have to double-check that the file is indeed there (not a mistyped command), and then locate the

Re: Misleading error when attempting to run foreign executable

2021-10-09 Thread Alex fxmbsw7 Ratchev
id apprechiate such a fmt update thanks On Fri, Oct 8, 2021, 17:44 Chet Ramey wrote: > On 10/4/21 10:06 AM, Ilkka Virta wrote: > > On Mon, Oct 4, 2021 at 4:46 PM Chet Ramey > > wrote: > > > > Bash reports the error it gets back from execve. In this case, it's >

Re: Misleading error when attempting to run foreign executable

2021-10-08 Thread Chet Ramey
On 10/4/21 10:06 AM, Ilkka Virta wrote: On Mon, Oct 4, 2021 at 4:46 PM Chet Ramey > wrote: Bash reports the error it gets back from execve. In this case, it's probably that the loader specified for the executable isn't present on your system. OTOH, for

Re: Misleading error when attempting to run foreign executable

2021-10-04 Thread Dennis Williamson
On Mon, Oct 4, 2021, 9:09 AM Ilkka Virta wrote: > On Mon, Oct 4, 2021 at 4:46 PM Chet Ramey wrote: > > > Bash reports the error it gets back from execve. In this case, it's > > probably that the loader specified for the executable isn't present on > your > > system. > > > > OTOH, for a script,

Re: Misleading error when attempting to run foreign executable

2021-10-04 Thread Ilkka Virta
On Mon, Oct 4, 2021 at 4:46 PM Chet Ramey wrote: > Bash reports the error it gets back from execve. In this case, it's > probably that the loader specified for the executable isn't present on your > system. > OTOH, for a script, Bash checks to see if the problem is with the interpreter and

Re: Misleading error when attempting to run foreign executable

2021-10-04 Thread Chet Ramey
On 10/3/21 6:05 PM, Andrea Monaco wrote: > > Hello, > > > I'm using bash 5.0.3 on GNU/Linux. When I mount a GNU/Hurd filesystem and > try to run an executable found there, I get for example: > > bash: ./ext2fs: No such file or directory > > This seems a misleading error to me. The file is

Re: Misleading error when attempting to run foreign executable

2021-10-03 Thread Alex fxmbsw7 Ratchev
it is trying to execute its ld.so parser which linux doesnt have of hurd ( or so ) , thats why u get no file On Mon, Oct 4, 2021, 02:20 Andrea Monaco wrote: > > Hello, > > > I'm using bash 5.0.3 on GNU/Linux. When I mount a GNU/Hurd filesystem and > try to run an executable found there, I get

Misleading error when attempting to run foreign executable

2021-10-03 Thread Andrea Monaco
Hello, I'm using bash 5.0.3 on GNU/Linux. When I mount a GNU/Hurd filesystem and try to run an executable found there, I get for example: bash: ./ext2fs: No such file or directory This seems a misleading error to me. The file is there and is executable, I guess it can't be run on my system