Skip to content

uloop: allow reusing the existing environment for a new process - #344

Merged
jow- merged 1 commit into
ucode-lang:masterfrom
nbd168:uloop-env
Sep 15, 2026
Merged

jow- merged 1 commit into
ucode-lang:masterfrom
nbd168:uloop-env

Conversation

@nbd168

@nbd168 nbd168 commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

When passing null as environment argument to uloop.process(), reuse existing environ.
This makes it possible to avoid having to duplicate and convert it by passing the output of getenv().

When passing null as environment argument to uloop.process(), reuse
existing environ.
This makes it possible to avoid having to duplicate and convert it
by passing the output of getenv().

Signed-off-by: Felix Fietkau <nbd@nbd.name>
@jow-

jow- commented Nov 19, 2025

Copy link
Copy Markdown
Collaborator

Explicit null leading to inheritance seems counterintuitive on a first glance. My gut feeling would be null == nothing == empty environment. What about true or a literal string "inherit"?

@jow-

jow- commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

I did revisit it again and came to the conclusion that inherit on null / absent is likely the least surprising behavior. Explicit empty/sanitized env can be specified by passing an empty dict, so merging this as-is.

Sorry for the long delay.

@jow-
jow- merged commit ee4743c into ucode-lang:master Sep 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants