getoutput temporary fix

This commit is contained in:
Jack Halford 2017-03-05 18:15:09 +01:00
parent 510a0c303a
commit 25a8e2f65e
4 changed files with 8 additions and 7 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/13 14:20:45 by jhalford #+# #+# */
/* Updated: 2017/03/05 16:32:22 by jhalford ### ########.fr */
/* Updated: 2017/03/05 18:08:57 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -45,11 +45,12 @@ int launch_process(t_process *p)
}
process_setgroup(p, 0);
process_setsig();
DG("gonna redirect");
if (process_redirect(p))
exit (1);
if (p->attributes & PROCESS_BUILTIN)
exit((*p->execf)(p->path, p->av, data_singleton()->env));
(*p->execf)(p->path, p->av, data_singleton()->env);
ft_dprintf(2, "{red}%s: internal excve error{eoc}\n", SHELL_NAME);
ft_dprintf(2, "{red}%s: internal execve error on %s{eoc}\n", SHELL_NAME, p->av[0]);
}
else if (pid > 0)
{

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/13 17:07:10 by jhalford #+# #+# */
/* Updated: 2017/03/03 16:32:15 by jhalford ### ########.fr */
/* Updated: 2017/03/05 18:09:31 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/12 14:01:59 by jhalford #+# #+# */
/* Updated: 2017/03/03 16:45:40 by jhalford ### ########.fr */
/* Updated: 2017/03/05 18:07:24 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,7 +15,7 @@
char *command_getoutput(char *command)
{
return (command);
return (ft_strdup(command));
/* int fds[2]; */
/* t_btree *ast; */
/* t_astnode item; */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/11 14:04:48 by jhalford #+# #+# */
/* Updated: 2017/03/05 17:09:22 by jhalford ### ########.fr */
/* Updated: 2017/03/05 17:45:37 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */