www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2019/08/15/17:05:04

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
bh=8/hoKdMO7srQKHSx8Bn17w4QeH/TV9pAOJRpOUk0Okc=;
b=PnPt8nljWUJNlx4GGfyCo8mC++gqqyyW97Cia0UE3eV2mTtMBwGOgkbYhMpGAwyy0b
fZsUFsklVYr8/+qwK5wbG/w2Y3dwlt66xmby9YX1MnjYIE2lVjSKc+9JZy6Zd3K6MzuB
SfQR7vl0MlyST70D2BT5iOAOxiJHy0CjgDIMcy1nqlWZgcovtaltFj803WjtLRdO2MH1
OFjRWm+iso/72eiibjKTk8A+gRy8J6sYb6+fOgFZQztQC3zAnDuSdA97Us1iWVVztwtJ
ILOtTT5YuliBtJ4pfrF+J0kBSnR65fcc20sAtFge6/UOskJSFCG/VYOH/1KMmuI6Ov7u
khqA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to;
bh=8/hoKdMO7srQKHSx8Bn17w4QeH/TV9pAOJRpOUk0Okc=;
b=NYTObaOrZhNGSSg4/1BXDTYi6DkSnHvyDqD67/d4KBsL56hyq0gavoHgj32wTwd9P1
SsqK94VBqvn9ltYbXQHYbEKFyvCmWx1o7Q497LpGk1gPudvAkQ5BjfxYnlEnZ5VbYGAq
kp0V37LoFEwHC5eo11oHRi6awtWTaFpHSdnLkhbFKC8fY0XBWeK/kFb6mabV/JHXiKG4
7ffOJ3xZAtveRdQYqH1RYDBIYv+BckYgalkevd0iCdkGPLKw/ji2vkxmkLlEqlgr7naI
xgUz1qp1SWkXc62nhvOY7hpL83OVk8pK2qQUdImGmeewLWXBeegP7neSKT4XWT02L/r5
jWog==
X-Gm-Message-State: APjAAAVSy9zX9KSi9ywGiFWdAeKL8zWDAYnAUKzi1oVRX63sgFK6InPh
aKB4zxy5IO71m/TbxIspkHfkF97E4rN1/HekqywpVg==
X-Google-Smtp-Source: APXvYqzRytT8HdRT7SHofag5VlieshwSNUESetvOVQp9WWfohubEFv//18VxyKFdFwbtffUMWNZKvee/abc0umG72f8=
X-Received: by 2002:a5d:924e:: with SMTP id e14mr5244021iol.215.1565902832023;
Thu, 15 Aug 2019 14:00:32 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <93e55dbd-cbd4-9de1-2c29-c7bb08d872f0@yandex.ru>
References: <93e55dbd-cbd4-9de1-2c29-c7bb08d872f0 AT yandex DOT ru>
From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Date: Fri, 16 Aug 2019 00:00:31 +0300
Message-ID: <CAA2C=vCoQth+AZc9FsEqX2A2STx9kVMvJ8moYHLzjgP=uc1cMQ@mail.gmail.com>
Subject: Re: [patch] fix empty environment handling
To: djgpp AT delorie DOT com
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 8/11/19, Stas Sergeev (stsp2 AT yandex DOT ru) [via djgpp AT delorie DOT com]
<djgpp AT delorie DOT com> wrote:
> Hello.
>
> There are several djgpp-written shells in the
> wild, and they are troubled with the fact that
> djgpp does not handle the empty environment.
>
> Every DOS has its own way of presenting the
> empty environment:
> - FreeDOS presents it as "0xd 0x1 0x0 <argv0>"
> which is the worst possible representation.
> Fortunately they noticed that all shells crash,
> and added a work-around to set "PATH=."
> instead of keeping the env empty. No work-around
> is therefore needed on djgpp side.
> - fdpp (freedos-plus-plus) presents an empty
> env as "0x0 0x1 0x0 <argv0>". The attached
> patch handles this by moving the env-traversion
> loop condition check before the loop itself.
> - PC/MS-DOS presents an empty env as 0 in
> the PSP:2c. For that condition, the attached patch
> adds a check and the adequate error message.
> The only work-around is to use "set PATH=."
> in config.sys.
> - DR-DOS always puts 0 in PSP:2c, regardless
> of whether the env is empty or not. No easy
> work-around for that one, other than to run
> the djgpp-written shell via the native shell.
>
> Patch attached.

Has anyone reviewed and/or tested this?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019