[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: binfmt_script and ^M
From: |
Andreas Schwab |
Subject: |
Re: binfmt_script and ^M |
Date: |
05 Mar 2001 14:37:09 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.99 |
Jan Nieuwenhuizen <janneke@gnu.org> writes:
|> Pavel Machek <pavel@suse.cz> writes:
|>
|> > > $ head -1 testscript
|> > > #!/bin/sh
|> > > $ ./testscript
|> > > bash: ./testscript: No such file or directory
^^^^^^^^^^^^^^^^^^^^^^^^^
|> >
|> > What kernel wants to say is "/usr/bin/perl\r: no such file". Saying ENOEXEC
|> > would be even more confusing.
|>
|> So, why don't we make bash say that, then? As I guess that we've all
|> been bitten by this before.
|>
|> What are the chances for something like this to be included?
Very low, because it would not change anything.
|> @@ -3155,7 +3191,12 @@
|>
|> if (command == 0)
|> {
|> - internal_error ("%s: command not found", pathname);
^^^^^^^^^^^^^^^^^
|> + char buf[80];
|> + char *interpreter = extract_hash_bang_interpreter (pathname, buf);
|> +
|> + internal_error ("%s: command not found: `%s'", pathname,
|> + interpreter);
|> +
|> exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
|> }
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
- Re: binfmt_script and ^M, Jan Nieuwenhuizen, 2001/03/05
- Re: binfmt_script and ^M, Alan Cox, 2001/03/05
- Re: binfmt_script and ^M,
Andreas Schwab <=
- Re: binfmt_script and ^M, Richard B. Johnson, 2001/03/05
- Re: binfmt_script and ^M, John Kodis, 2001/03/05
- Re: binfmt_script and ^M, Rik van Riel, 2001/03/05
- Re: binfmt_script and ^M, Jeff Mcadams, 2001/03/05
- Re: binfmt_script and ^M, Paul Flinders, 2001/03/05
- Re: binfmt_script and ^M, Andreas Schwab, 2001/03/05
- Re: binfmt_script and ^M, Paul Flinders, 2001/03/05
- Re: binfmt_script and ^M, Paul Flinders, 2001/03/05
- Re: binfmt_script and ^M, Andreas Schwab, 2001/03/06
- Re: binfmt_script and ^M, Paul Flinders, 2001/03/06