[HN Gopher] Inherit environment variables from PID 1 by reading ...
___________________________________________________________________
Inherit environment variables from PID 1 by reading /proc/1/environ
Author : chatmasta
Score : 5 points
Date : 2023-01-21 21:20 UTC (1 hours ago)
(HTM) web link (gist.github.com)
(TXT) w3m dump (gist.github.com)
| sigmonsays wrote:
| where do you set variables on pid1 ?
|
| I dont fully get this use case yet..
| pxx wrote:
| Docker.
| chatmasta wrote:
| It's pretty niche (and hacky). My use case is debugging CI
| runners by connecting to them via a reverse shell [0]. I want
| to manually run CI commands, but my reverse shell drops me into
| a new process without any of the same environment variables
| available to it that are made available by the CI platform to
| the runner. So I wanted a command I could paste to quickly
| inherit those environment variables and run the CI scripts that
| depend on them.
|
| [0] https://github.com/milesrichardson/shonion
___________________________________________________________________
(page generated 2023-01-21 23:01 UTC)