Skip to content

Commit

Permalink
feat(process): allow commands and envs on proces_start (#1477)
Browse files Browse the repository at this point in the history
* feat(process): allow commands and envs on proces_start

* refactor(process): copy process arguments once whenever possible

Refactors the code to use an arglist type which is just lpCmdline on Windows
and a list in Linux.
The function automatically escapes the command when it is needed, avoiding
a second copy.

This also allows UTF-8 commands btw.

* fix(process): fix invalid dereference

* refactor(process): mark xstrdup as potentially unused

* feat(process): add parent process environment when launching process

* fix(process): fix operator precedence with array operators

* fix(process): fix segfault when freeing random memory

* fix(process): fix wrong check for setenv()

* fix(process): fix accidentally initializing an array by assignment

* fix(process): clear return value if success
  • Loading branch information
takase1121 authored Nov 30, 2023
1 parent ad15971 commit 142f0a1
Showing 1 changed file with 327 additions and 93 deletions.
Loading

0 comments on commit 142f0a1

Please sign in to comment.