[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#270285: dosemu: unix.com -s fails to import env vars with an underscore



On Mon, Sep 06, 2004 at 10:44:52PM +0100, Roger Leigh wrote:
> > I did the exactly same thing as you, and here are my results:
> [snip working results]
> 
> Hmm, that's interesting!

I thought so :)

> That's what I see, but if the variable /is/ set, the behaviour of
> "unix -s" is different whether it's run from (autoexec.bat or a
> command specified on the dosemu command line) compared with being run
> from the command prompt by hand (which works perfectly).

I can't see such a distinction in the code.  Maybe it's an environment
space thing...

> Yes--it's the stock dosemu and dosemu-freedos from unstable.  I can't
> say I like it (it says "out of memory" when it can't find a command!).

Yeah, I ran into that too.  Unfortunately the maintainer has left the
project and I don't know if a new maintainer has been assigned yet.

> Update: not using vspawn, and making command.com writable lets it run
> normally and "unix -s" does then work as expected, but it's still not
> quite right:
> 
> $ export
> declare -x BAR="bar"
> declare -x BAZ="baz"
> declare -x CSL_ACC="3453"
> declare -x CSL_COMMAND="dsfs  dfdfdfdfdfdfd /dfdfd"
> declare -x CSL_CSBIG="dskf dskf sdf dsf dsfdf dsf dsf"
> declare -x CSL_CSNRM="dskf dskf sdf dsf dsfdf dsf dsf"
> declare -x FOO="foo"
> declare -x FOO_BAR="foobar"
> declare -x FOO_BAZ="foobaz"

I did this.

> $ cat test2.bat
> UNIX -S FOO
> UNIX -S FOO
> UNIX -S BAR
> UNIX -S BAZ
> UNIX -S FOO_BAR
> UNIX -S FOO_BAZ
> UNIX -S CSL_ACC
> UNIX -S CSL_CSNRM
> UNIX -S CSL_CSBIG
> UNIX -S CSL_COMMAND
> SET
> PAUSE

I created a batch file d:\test2.bat containnig this commands.

> $ dosemu
> C:\>d:\test2
> D:\>UNIX -S FOO
> D:\>UNIX -S FOO
> D:\>UNIX -S BAR
> D:\>UNIX -S BAZ
> D:\>UNIX -S FOO_BAR
> D:\>UNIX -S FOO_BAZ
> D:\>UNIX -S CSL_ACC
> D:\>UNIX -S CSL_CSNRM
> D:\>UNIX -S CSL_CSBIG
> D:\>UNIX -S CSL_COMMAND
> D:\>SET
> PATH=c:\bin;c:\gnu;c:\dosemu
> COMSPEC=C:\FREECOM\COMMAND.COM
> HELPPATH=c:\help
> PROMPT=$P$G
> DOSTMP=/tmp/dosemu.vapgkb/tmp
> DOSDRIVE_D=/home/roger
> DOSEMU_VERSION=1.2.1.0
> FOO=foo
> BAR=bar
> BAZ=baz
> FOO_BAR=foobar
> FOO_BAZ=foobaz
> CSL_ACC=3453
> CSL_CSNRM=dskf dskf sdf dsf dsfdf dsf dsf
> CSL_CSBIG=dskf dskf sdf dsf dsfdf dsf dsf
> CSL_COMMAND=dsfs  dfdfdfdfdfdfd /dfdfd

This works.

> All of the env vars are there.  Now:
> 
> $ dosemu d:\\test2
> C:\>SET
> [same commands as before]
> PATH=c:\bin;c:\gnu;c:\dosemu
> COMSPEC=C:\FREECOM\COMMAND.COM
> HELPPATH=c:\help
> PROMPT=$P$G
> DOSTMP=/tmp/dosemu.jsddnx/tmp
> DOSDRIVE_D=/home/roger
> DOSEMU_VERSION=1.2.1.0
> FOO=foo
> BAR=bar
> BAZ=baz
> FOO_BAR=foobar
> FOO_BAZ=foobaz
> CSL_ACC=3453
> 
> Notice that the CSL_CSNRM, CSL_CSBIG and CSL_COMMAND vars are now
> missing.  test2.bat was invoked by this line in autoexec.bat:
> 
> unix -e

On my side it works....
FreeCom version 0.82 pl 3 [Dec 10 2003 06:54:37]

D: = LINUX\FS/HOME/NEMESIS  attrib = READ/WRITE
E: = LINUX\FS/TMP/DOSEMU.YBTZLV/TMP  attrib = READ/WRITE
"Welcome to dosemu 1.2.1.0!"
SHARE installed.
About to Execute : d:\test2.bat

PATH=c:\bin;c:\gnu;c:\dosemu
COMSPEC=C:\COMMAND.COM
HELPPATH=c:\help
PROMPT=$P$G
DOSTMP=/tmp/dosemu.ybtzlv/tmp
DOSDRIVE_D=/home/nemesis
TEMP=E:\
DOSEMU_VERSION=1.2.1.0
FOO=foo
BAR=bar
BAZ=baz
FOO_BAR=foobar
FOO_BAZ=foobaz
CSL_ACC=3453
CSL_CSNRM=dskf dskf sdf dsf dsfdf dsf dsf
CSL_CSBIG=dskf dskf sdf dsf dsfdf dsf dsf
CSL_COMMAND=dsfs  dfdfdfdfdfdfd /dfdfd
Press any key to continue . . .


The plot thickens?  I wish I could reproduce this....

Do you have another system where you can try a clean installation of the
packages?  Perhaps something has become messed up.

One thing you could make sure is that your config.sys is running
command.com with an environment size like e:1024 instead of the default,
which I think is only 256.

-- 
Ryan Underwood, <nemesis@icequake.net>

Attachment: signature.asc
Description: Digital signature


Reply to: