SvarDOS / edrdos

Enhanced DR-DOS kernel and command interpreter ported to JWasm and OpenWatcom C
http://svardos.org/
Other
40 stars 4 forks source link

No COMSPEC in boot environment unless CONFIG.SYS sets anything #101

Closed mateuszviste closed 3 months ago

mateuszviste commented 3 months ago

Not entirely sure this is a kernel bug, still have to debug it to understand better what happens, but here's the symptom: when booting EDR from the SvarDOS install floppy, I noticed there is no COMSPEC in the environment.

image

Now, if I only add a SET SOMETHING=... directive to CONFIG.SYS, then COMSPEC appears.

image

mateuszviste commented 3 months ago

Now with some config-env debug data (output by SvarCOM when it is invoked by the kernel). When it works fine:

image

when it does not:

image

So the COMSPEC variable is actually there, but the environment starts with a 0 so SvarCOM thinks it is empty.

Also, in both cases there is no "exec string" trailing the environment strings.

boeckmann commented 3 months ago

Thanks for the pictures. These clearly show what is going on. I have to treat the empty env as a special case.

boeckmann commented 3 months ago

I hope https://github.com/SvarDOS/edrdos/commit/525b418819b1c775afd040f28c0254fb527646ae fixes it. Build is under artifacts.

mateuszviste commented 3 months ago

Confirmed, it works. Thank you!

image