mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-30 11:10:23 -04:00
spawn: set $PWD, in addition to calling chdir(cwd)
This commit is contained in:
parent
90ce4f3008
commit
332cb90134
1 changed files with 6 additions and 3 deletions
9
spawn.c
9
spawn.c
|
|
@ -54,9 +54,12 @@ spawn(struct reaper *reaper, const char *cwd, char *const argv[],
|
||||||
goto child_err;
|
goto child_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cwd != NULL && chdir(cwd) < 0) {
|
if (cwd != NULL) {
|
||||||
LOG_WARN("failed to change working directory to %s: %s",
|
setenv("PWD", cwd, 1);
|
||||||
cwd, strerror(errno));
|
if (chdir(cwd) < 0) {
|
||||||
|
LOG_WARN("failed to change working directory to %s: %s",
|
||||||
|
cwd, strerror(errno));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xdg_activation_token != NULL) {
|
if (xdg_activation_token != NULL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue