diff options
Diffstat (limited to 'mh/mh_whatnow.c')
-rw-r--r-- | mh/mh_whatnow.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mh/mh_whatnow.c b/mh/mh_whatnow.c index 13fff10da..670ccaf99 100644 --- a/mh/mh_whatnow.c +++ b/mh/mh_whatnow.c @@ -1,5 +1,5 @@ /* GNU Mailutils -- a suite of utilities for electronic mail - Copyright (C) 2003-2019 Free Software Foundation, Inc. + Copyright (C) 2003-2024 Free Software Foundation, Inc. GNU Mailutils is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -688,7 +688,6 @@ mh_whatnowproc (struct mh_whatnow_env *wh, int initial_edit, const char *prog) if (pid == 0) { struct mu_wordsplit ws; - int i; if (mu_wordsplit (prog, &ws, MU_WRDSF_DEFFLAGS & ~MU_WRDSF_CESCAPES)) @@ -700,8 +699,7 @@ mh_whatnowproc (struct mh_whatnow_env *wh, int initial_edit, const char *prog) set_default_editor (wh); mh_whatnow_env_to_environ (wh); - for (i = mu_getmaxfd (); i > 2; i--) - close (i); + mu_close_fds (3); execvp (ws.ws_wordv[0], ws.ws_wordv); mu_diag_funcall (MU_DIAG_ERROR, "execvp", prog, errno); _exit (127); |