mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
Fix pr#256 pledge() too early.
expand_tilde() may be called multiple times.
This commit is contained in:
parent
a86f709be2
commit
3d694d8354
1 changed files with 3 additions and 3 deletions
|
@ -1432,9 +1432,6 @@ expand_tilde(const char *s)
|
|||
ppwd = strlen(user) == 0 ? getpwuid(getuid()) : getpwnam(user);
|
||||
free(user);
|
||||
|
||||
if (pledge("stdio proc exec rpath", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
if (ppwd == NULL)
|
||||
result = strdup(sc);
|
||||
else
|
||||
|
@ -13327,6 +13324,9 @@ main(int argc, char *argv[])
|
|||
|
||||
scan_config();
|
||||
|
||||
if (pledge("stdio proc exec rpath", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
validate_spawns();
|
||||
|
||||
if (getenv("SWM_STARTED") == NULL)
|
||||
|
|
Loading…
Add table
Reference in a new issue