summary refs log tree commit diff
path: root/src/exec.c (follow)
Commit message (Collapse)AuthorAge
* [EXEC] Fixed _PATH_BSHELL warningHerbert Xu2008-05-03
| | | | | | | | | | | | | | | | 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>
* [EXEC] Fixed execing of scripts with no hash-bangHerbert Xu2007-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [REDIR] Remove redundant CLOEXEC callsHerbert Xu2007-05-12
| | | | | Now that we're marking file descriptors as CLOEXEC in savefd, we no longer need to close them on exec or in setinputfd.
* [BUILTIN] Fixed command -v segmentation faultHerbert Xu2006-10-22
| | | | | | | | | | | | | | | 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.
* [SYSTEM] Added default implementation of bsearchHerbert Xu2005-10-29
| | | | Added impelmentation of bsearch since klibc doesn't have it yet.
* [BUILTIN] Stop using sysexits.h in commandcmdHerbert Xu2005-10-29
| | | | | | | | | | | 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.
* Copyright/licence updates and remove all traces of sys/cdefs.hHerbert Xu2005-10-29
| | | | | | | | | | | 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.
* Removed some unnecessary inclusions of input.h.herbert2005-09-26
|
* Renamed error to sh_error.herbert2005-09-26
|
* Eliminated global exerrno.herbert2005-09-26
|
* Initial import.Herbert Xu2005-09-26