Commit Graph

2 Commits

Author SHA1 Message Date
Max Altgelt b02b92e16b
feat: Add support for environment variable read
Add support (for Linux and Windows for now) for reading the
environment variables of a process, with a similar syntax to
os.Environ().
For Windows, this includes some refactoring for clean access to the
RTL_USER_PROCESS_PARAMETERS structure which points to the command
line and the environment variables.
2021-07-13 15:11:29 +02:00
Sergey Vinogradov 065e609cbf Refactor "process" package
* All context-less wrapping functions (the ones without WithContext
suffix) were moved into process.go since they all are the same.
* Call context is now passed to all underlying functions in
*WithContext() functions.
* All common *BSD bits were moved to process_bsd.go.
* Process.Tgid() method lacked a WithContext counterpart, so
Process.TgidWithContext() was added for uniformity.
* NewProcessWithContext() function was added since NewProcess() is
used a lot throughout the module, and there is no way to pass a
context to it.

This is a part of #761 effort.
2020-10-12 18:15:29 +03:00