On 3/31/25 1:48 PM, Damir Simunic wrote:

The TLDR; is that getcwd and s6-dirname do not provide a desired answer when 
something messes with the process cwd and argv[0].

[...]
The launched process receives this very minimal environment: default path, CWD 
set to /, and the name of the service; launched executable is wired to stdout 
and stdin as configured (or /dev/null by default if not specified).

Is there a reason you can't just write a script that sets the environment the way you want and then execs into s6-svscan, and haveĀ  launchd run that script instead of directly running s6-svscan? That seems like it would be pretty straightforward, unless I'm missing something.

Reply via email to