Hello there,

I just stumbled accross some really strange behaviour of the MirKSH shell. I 
built a small testcase that shows what's going on. 

The following files are needed:

exitcode1.sh (which is nothing more than a Bourne shell script which exits with 
rc 1)
include.src (which only assigns the value $COLUMNS to the variable x)
myscript.ksh (which sources include.src and then executes exitcode1.sh)

After running myscript.ksh my shell console seems to be smashed. No carriage 
return seems to be done anymore when pressing the return key. Any characters 
entered on the shell prompt aren't shown anymore too.

So far I found out that this weird behaviour only comes up when accessing one 
the variables COLUMNS or LINES while sourcing a script. There is no problem 
with accessing (p.e.) PATH instead.

The content of the files is quite short.

exitcode1.sh
------------------------------------------------------------
#! /bin/sh

exit 1
------------------------------------------------------------

include.src
------------------------------------------------------------
x=${COLUMNS}
------------------------------------------------------------

myscript.ksh
------------------------------------------------------------
#! /bin/ksh

. $HOME/include.src

$HOME/exitcode1.sh

exit 0
------------------------------------------------------------

I use the MirKSH on Oracle Linux Server release 6.1 (x86_64) with MirKSH 
version MIRBSD KSH R39 2009/08/01. 

So, do you know about this strange behaviour of the shell ? Did I hit a bug 
here ? Or am I the bug, finally ? ;-)

Thanks a lot,
Carsten

Reply via email to