diff options
author | Kevin McCarthy <kevin@8t8.us> | 2017-03-18 13:48:02 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2017-03-18 13:48:02 -0700 |
commit | a41b3a452729460b730661bac7c5a9c5afa38407 (patch) | |
tree | 3a988c24a44fed118b69d3beb362854aa627b46b /filter.c | |
parent | 52949004f33a5112e1154fefb3455bc7cd421c13 (diff) |
Pass envlist to filter children too. (closes #3922)
The new setenv patch neglected to pass the envlist for filters too.
Unfortunately, the filter code was already set up to pass COLUMNS to
children, so it needed to be changed to add this to the envlist
instead.
Factor out mutt_envlist_set() from the parse_setenv() function, which
the filter code can then use to set COLUMNS after forking.
Diffstat (limited to 'filter.c')
-rw-r--r-- | filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -122,10 +122,10 @@ mutt_create_filter_fd (const char *cmd, FILE **in, FILE **out, FILE **err, if (MuttIndexWindow && (MuttIndexWindow->cols > 0)) { snprintf (columns, sizeof (columns), "%d", MuttIndexWindow->cols); - setenv ("COLUMNS", columns, 1); + mutt_envlist_set ("COLUMNS", columns); } - execl (EXECSHELL, "sh", "-c", cmd, NULL); + execle (EXECSHELL, "sh", "-c", cmd, NULL, mutt_envlist ()); _exit (127); } else if (thepid == -1) |