close fd's from the host terminal so shell doesnt inherit them all

only inherit the fd's we need/want. use eina_file_close_from()
This commit is contained in:
Carsten Haitzler 2019-11-20 08:44:48 +00:00
parent cfbbe60164
commit bcb4e27bed
1 changed files with 3 additions and 0 deletions

View File

@ -778,6 +778,9 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd,
snprintf(buf, sizeof(buf), "WINDOWID=%lu", window_id);
putenv(buf);
}
#if ((EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 24)) || ((EFL_VERSION_MAJOR == 1) && (EFL_VERSION_MINOR == 23) && (EFL_VERSION_MICRO == 99))
eina_file_close_from(3, NULL);
#endif
if (!login_shell)
execvp(args[0], (char *const *)args);
else