Email list hosting service & mailing list manager

set-environment-variable Lassi Kortela (05 Dec 2019 00:18 UTC)
Re: set-environment-variable John Cowan (05 Dec 2019 19:48 UTC)
Re: set-environment-variable hga@xxxxxx (06 Dec 2019 00:29 UTC)
Re: set-environment-variable Lassi Kortela (06 Dec 2019 09:55 UTC)
Re: set-environment-variable John Cowan (06 Dec 2019 13:21 UTC)
Re: set-environment-variable Lassi Kortela (06 Dec 2019 13:53 UTC)
Re: set-environment-variable John Cowan (06 Dec 2019 17:51 UTC)
Re: set-environment-variable Arthur A. Gleckler (06 Dec 2019 18:45 UTC)
Re: set-environment-variable Lassi Kortela (06 Dec 2019 19:00 UTC)
Re: set-environment-variable Lassi Kortela (06 Dec 2019 20:41 UTC)
Re: set-environment-variable hga@xxxxxx (07 Dec 2019 15:07 UTC)
Re: set-environment-variable Lassi Kortela (07 Dec 2019 16:14 UTC)
Re: set-environment-variable Lassi Kortela (07 Dec 2019 16:23 UTC)
Re: set-environment-variable hga@xxxxxx (07 Dec 2019 16:30 UTC)
Re: set-environment-variable John Cowan (07 Dec 2019 17:31 UTC)
Re: set-environment-variable Lassi Kortela (07 Dec 2019 20:12 UTC)
Is set-environment-variable needed after all? Lassi Kortela (07 Dec 2019 20:15 UTC)
Re: Is set-environment-variable needed after all? John Cowan (07 Dec 2019 21:13 UTC)
Re: Is set-environment-variable needed after all? Lassi Kortela (08 Dec 2019 19:36 UTC)
Re: Is set-environment-variable needed after all? hga@xxxxxx (08 Dec 2019 20:08 UTC)
Re: Is set-environment-variable needed after all? Lassi Kortela (09 Dec 2019 11:00 UTC)
Re: Is set-environment-variable needed after all? Duy Nguyen (09 Dec 2019 03:51 UTC)
Re: Is set-environment-variable needed after all? John Cowan (09 Dec 2019 04:21 UTC)
Re: Is set-environment-variable needed after all? Lassi Kortela (09 Dec 2019 10:39 UTC)
Re: Is set-environment-variable needed after all? Lassi Kortela (09 Dec 2019 10:41 UTC)
Re: Is set-environment-variable needed after all? Duy Nguyen (09 Dec 2019 10:45 UTC)
Re: Is set-environment-variable needed after all? Lassi Kortela (09 Dec 2019 10:49 UTC)
Re: Is set-environment-variable needed after all? John Cowan (09 Dec 2019 19:36 UTC)
Re: Is set-environment-variable needed after all? Lassi Kortela (09 Dec 2019 19:46 UTC)

Re: set-environment-variable hga@xxxxxx 07 Dec 2019 16:29 UTC

> From: Lassi Kortela <xxxxxx@lassi.io>
> Date: Saturday, December 07, 2019 10:14 AM

>> After accepting the PR, following my MO I'm implementing it in Chibi
>> Scheme.
>
> Thanks! Sorry I dropped the ball on that. I think Chibi has getenv
> already, but not setenv.

No, not at all, I consider it a primary duty to maintain the Chibi
Scheme UNIX and UNIX-like example implementation.  I did a search
for a setenv and couldn't find it.

It's a very simple interface, it will take me less time to write
it than what I'm taking in this API question.

>> Turns out POSIX gives us an option not exposed by this or
>> other Scheme APIs I've glanced at, an overwrite argument, see:
>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/setenv.html
>>
>>> If the environment variable named by envname already exists and the
>>> value of overwrite is non-zero, the function shall return success
>>> and the environment shall be updated. If the environment variable
>>> named by envname already exists and the value of overwrite is zero,
>>> the function shall return success and the environment shall remain
>>> unchanged.
>>
>> It is worthwhile to add this to the SRFI 170 API, as, say, an
>> optional argument, defaulting to overwrite?
>
> Yeah, that flag has been in the Unix/C API since forever. I've never
> seen anyone use it... People always want to overwrite the old value.
> Therefore I suggest leaving out the option from the Scheme API.

I'm having extreme difficulty imagining why anyone would want it,
especially since "failure" is silent.  But someone, sometime thought it
was useful, and this *is* a POSIX interface, so we should consider it.

I think I'll include the flag in the wrapper, and for now omit it
in the Scheme call, while we wait on any other opinions on it.

> [ Windows, which I left behind after XP. ]

- Harold