[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell_execve tries to execute files for other interpreters
From: |
Chet Ramey |
Subject: |
Re: shell_execve tries to execute files for other interpreters |
Date: |
Thu, 25 Apr 2002 13:49:30 -0400 |
> I tried to write a script to be interpreted by another script. Each
> script started with a #! line. It turns out that this recursive
> script execution is not supported on Solaris 2.7 (execve returns
> ENOEXEC), so my attempt failed.
>
> However, the process of diagnosing the problem was slowed by Bash
> 2.05a's misguided attempt to be helpful. If simply exec'ing the file
> fails, Bash examines the beginning of the file to see if it is
> binary. If it is not, it then interprets the file as a Bash script.
This behavior is mandated by POSIX.1-2001 (and POSIX.2-1992). See
http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#tag_02_09_01
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: shell_execve tries to execute files for other interpreters,
Chet Ramey <=