Only put PATH= in the environment if it's still empty just before
executing the shell. This repairs SET PATH=.... in config.sys without confusing anyone. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@762 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
5567aba08b
commit
2b9e17a680
@ -137,8 +137,8 @@ UWORD ram_top = 0; /* How much ram in Kbytes */
|
||||
static UBYTE ErrorAlreadyPrinted[128];
|
||||
|
||||
|
||||
char master_env[128] = {"PATH="}; /* some shells panic on empty master env. */
|
||||
static char *envp = master_env + 6; /* point to the second zero */
|
||||
char master_env[128] = {0};
|
||||
static char *envp = master_env;
|
||||
|
||||
struct config Config = {
|
||||
0,
|
||||
|
@ -364,6 +364,8 @@ STATIC void kernel()
|
||||
int rc;
|
||||
|
||||
exb.exec.env_seg = DOS_PSP + 8;
|
||||
if (master_env[0] == '\0') /* some shells panic on empty master env. */
|
||||
strcpy(master_env, "PATH=.");
|
||||
fmemcpy(MK_FP(exb.exec.env_seg, 0), master_env, sizeof(master_env));
|
||||
|
||||
/* process 0 */
|
||||
|
Loading…
Reference in New Issue
Block a user