Re: Setting environment variables

Alan Ruttenberg <[email protected]> Sat, 29 Apr 2023 18:38:44 -0400
Newsgroups gmane.editors.j.devel
Message-ID <CAFKQJ8kYRQXnqhYNtu7ZzjdoOQbXR7NNGTKAy6AOQLVEDdxYeA@mail.gmail.com>
--000000000000265b0305fa81427c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Here's what I did:
https://github.com/alanruttenberg/lsw2/blob/owlapiv4/util/setenv.lisp

You still can't set environment variables in the parent process, of course.

Alan


On Sat, Apr 29, 2023 at 2:25=E2=80=AFAM Scott L. Burson <[email protected]=
om>
wrote:

> Hi,
>
> I've been away from ABCL for some time, so I ask your indulgence in case
> I'm revisiting a familiar issue.  I tried (SETF (UIOP:GETENV "foo")
> "value") and got
>
> Not (currently) implemented on ABCL: (SETF UIOP/OS:GETENV)
>
> On investigation, I see that the JVM doesn't normally support setting
> environment variables, but there are known ways to jimmy it into doing so=
:
> https://stackoverflow.com/questions/318239/how-do-i-set-environment-varia=
bles-from-java
>
> Would a PR to add such a hack to ABCL be welcome, or should I just make i=
t
> a local mod?  Or is there another, recommended way of doing this?
>
> -- Scott
>
>

--000000000000265b0305fa81427c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Here&#39;s what I did: <a href=3D"https://github.com/=
alanruttenberg/lsw2/blob/owlapiv4/util/setenv.lisp">https://github.com/alan=
ruttenberg/lsw2/blob/owlapiv4/util/setenv.lisp</a></div><div><br></div><div=
>You still can&#39;t set environment variables in the parent process, of co=
urse.</div><div><br></div><div>Alan</div><div><br></div></div><br><div clas=
s=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Apr 29, 202=
3 at 2:25=E2=80=AFAM Scott L. Burson &lt;<a href=3D"mailto:Scott@sympoiesis=
.com">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi,</div><div><br></div><di=
v>I&#39;ve been away from ABCL for some time, so I ask your indulgence in c=
ase I&#39;m revisiting a familiar issue.=C2=A0 I tried (SETF (UIOP:GETENV &=
quot;foo&quot;) &quot;value&quot;) and got</div><div><br></div><div>Not (cu=
rrently) implemented on ABCL: (SETF UIOP/OS:GETENV)</div><div><br></div><di=
v>On investigation, I see that the JVM doesn&#39;t normally support setting=
 environment variables, but there are known ways to jimmy it into doing so:=
 <a href=3D"https://stackoverflow.com/questions/318239/how-do-i-set-environ=
ment-variables-from-java" target=3D"_blank">https://stackoverflow.com/quest=
ions/318239/how-do-i-set-environment-variables-from-java</a></div><div><br>=
</div><div>Would a PR to add such a hack to ABCL be welcome, or should I ju=
st make it a local mod?=C2=A0 Or is there another, recommended way of doing=
 this?</div><div><br></div><div>-- Scott</div><div><br></div></div>
</blockquote></div>

--000000000000265b0305fa81427c--