fork can fail

This commit is contained in:
Boris Faure 2014-09-14 22:46:22 +02:00
parent c312797e4e
commit 51555f9c35
1 changed files with 5 additions and 0 deletions

View File

@ -362,6 +362,11 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd,
goto err;
}
ty->pid = fork();
if (ty->pid < 0)
{
ERR("unable to fork: %s", strerror(errno));
goto err;
}
if (!ty->pid)
{
const char *shell = NULL;