| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With klcc we get
klcc -DHAVE_CONFIG_H -I. -I.. -include ../config.h -DBSD=1 -DSHELL
-DIFS_BROKEN -Wall -D__CTYPE_NO_INLINE -MT exec.o -MD -MP -MF
.deps/exec.Tpo -c -o exec.o exec.c
exec.c: In function 'tryexec':
exec.c:160: warning: comparison with string literal results in unspecified behavior
Storing it in a local variable fixes the problem.
Thanks to Dan McGee for reporting this.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function tryexec used the original name instead of the path found through
PATH search. This patch fixes that.
Test case:
trap 'rm -f $TMP' EXIT
TMP=$(tempfile -s nosuchthing)
cat <<- EOF > $TMP
echo OK
EOF
chmod u+x $TMP
cd /
PATH=${TMP%/*} ${TMP##*/}
Old result:
/bin/sh: Can't open filelgY4Fanosuchthing
New result:
OK
|
|
|
|
|
| |
Now that we're marking file descriptors as CLOEXEC in savefd, we no longer
need to close them on exec or in setinputfd.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Sat, Oct 21, 2006 at 02:19:18PM +0000, Gerrit Pape wrote:
> Hi Herbert, please see
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387458
>
> On Thu, Sep 14, 2006 at 03:50:02PM +0200, Julien Danjou wrote:
> > I just found this bug which is easily reproductible:
> >
> > % dash -c 'command -v'
> > zsh: segmentation fault dash -c 'command -v'
Since bash's behaviour is minimalist here, I've decided to adopt its
behaviour here as well which is to return success silently.
|
|
|
|
| |
Added impelmentation of bsearch since klibc doesn't have it yet.
|
|
|
|
|
|
|
|
|
|
|
| |
This gets rid of the only reference of sysexits.h in dash which is
from commandcmd. This is needed for klibc support since it doesn't
have sysexits.h.
The only uses of sysexits.h in commandcmd is superfluous anyway. In
fact, it is overly sensitive about usages such as 'command -vV ls'.
By making its behaviour close to that of bash/ksh, we end up saving
a bit of space too.
|
|
|
|
|
|
|
|
|
|
|
| |
This change updates the BSD licence to the three-clause version since
NetBSD has already done so. This makes dash GPL-compatible.
It also adds Christos Zoulas (NetBSD ash maintainer) to the COPYING file.
I've added "copyright by Herbert Xu" to most files.
Finally all CVS IDs and inclusion of sys/cdefs.h have been removed.
The latter is needed for support of klibc.
|
| |
|
| |
|
| |
|
|
|