[ast-developers] Segfault on unsetting function while it's running

2015-05-24 Thread Martijn Dekker
to make the shell segfault. Hope this helps, Martijn Dekker (Groningen, Netherlands) ___ ast-developers mailing list ast-developers@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-developers

[ast-developers] [BUG] function definitions within subshells are ignored

2015-06-07 Thread Martijn Dekker
ksh93 does not respect function definitions within subshells; it ignores a function definition within a subshell if a function by that name already exists in the main shell. This applies both to regular subshells and to command substitutions. Test script: #! /bin/ksh fn() { echo 'Version

Re: [ast-developers] ksh -u or 'set -o nounset' behaviour for undefined positional parameter like $1.

2015-06-07 Thread Martijn Dekker
lijo george schreef op 01-06-15 om 14:36: > It seems ksh does not treat unset positional parameters like "$1" as > an error while using the "-u" or "nounset" option. [...] > Could someone please confirm whether this is is a bug. It is. As the POSIX spec says, only "$@" and "$*" are supposed to be

[ast-developers] [BUG] quoting within bracket patterns has no effect

2016-01-17 Thread Martijn Dekker
Quotes should disable the special meaning of characters in glob patterns[*]. So this: case b in ( ['a-c'] ) echo 'false match' ;; ( [a-c] ) echo 'correct match' ;; esac should output "correct match". But on zsh and AT&T ksh93 (and only those), it outputs "false match". Meaning, quoting the char

[ast-developers] [BUG] ${.sh.subshell} broken

2016-10-17 Thread Martijn Dekker
I know there are no active developers at this point, but here's one for the archives in case there are active developers in the future. The ${.sh.subshell} (subshell level) variable is broken: case $(echo ${.sh.subshell} 1>&2 echo ${.sh.subshell} 1>&2 echo ${.sh.subshell}) in 1) ech

Re: [ast-developers] ksh file descriptor leak

2016-10-17 Thread Martijn Dekker
Op 14-10-16 om 14:32 schreef Jeff Frontz: > The reason I was trying to build the latest ksh on El Capitan was to see > if a file descriptor leak persists in the latest version. I can't get it to compile on El Capitan (10.11) at all. I still have a binary of the latest beta which I managed to compi

Re: [ast-developers] [BUG] ${.sh.subshell} broken

2016-10-17 Thread Martijn Dekker
Op 17-10-16 om 21:40 schreef Martijn Dekker: > I need this capability for my shell library to support ksh93. If anyone > can think of any workarounds, please let me know. Of course I can't just let stuff like this go... The bug occurs under really bizarrely specific circumstances.

Re: [ast-developers] [BUG] ${.sh.subshell} broken

2016-10-17 Thread Martijn Dekker
Op 17-10-16 om 22:58 schreef Martijn Dekker: > But look what happens if you add a redirection, even a no-op one like 1>&1: > > $ echo $( (echo ${.sh.subshell} 1>&1; echo ${.sh.subshell} 1>&1) ) > 2 0 Turns out you don't actually have to read ${.sh.subshel

Re: [ast-developers] [BUG] ${.sh.subshell} broken

2016-10-17 Thread Martijn Dekker
Op 18-10-16 om 00:15 schreef Martijn Dekker: > Turns out you don't actually have to read ${.sh.subshell} twice: it is > the output redirection within a command substitution that kills > ${.sh.subshell}. This is finally starting to make some sense now. > > $ echo $( (: 1>

[ast-developers] [BUG] 'command -p' broken in certain contexts

2017-02-26 Thread Martijn Dekker
'command -p' is supposed to run a command with the default system PATH as opposed to the current $PATH, so it is guaranteed to get a POSIX standard utility. But: $ ksh -c 'command -p ls' ksh: ls: not found $ ksh -c '(command -p ls)' ksh: ls: not found $ ksh -c 'echo $(command -p ls)' (file listing

[ast-developers] [BUG] ${var+set} does not work within loops

2017-09-26 Thread Martijn Dekker
I was bitten today by yet another bizarre bug in ksh93. In the current release version of ksh93 as well as the beta, expansions like ${var+set} and ${var+:nonempty) do not work correctly when used within a 'for', 'while' or 'until' loop. Test script 1: unset -v var for i in 1 2 3 4 5; do

Re: [ast-developers] [PATCH] ast: add info about ast mailing lists

2018-03-14 Thread Martijn Dekker
Op 14-03-18 om 04:06 schreef Siteshwar Vashisht: > It's still not possible to subscribe to these lists. Mailman responds > to queries however the confirmation link redirects to > http://web-stage.research.att.com/error.html Yes, it is possible. The link doesn't work, but it works to confirm using