rectif retour des process non fork
This commit is contained in:
parent
cbb5059182
commit
af2fd99dd0
3 changed files with 11 additions and 7 deletions
|
|
@ -58,8 +58,11 @@ do_checkout ()
|
||||||
i_tmp=$(echo $i | sed 's/\//_/g')
|
i_tmp=$(echo $i | sed 's/\//_/g')
|
||||||
cp $i "$HOME/Documents/.$i_tmp.back"
|
cp $i "$HOME/Documents/.$i_tmp.back"
|
||||||
git checkout $i
|
git checkout $i
|
||||||
|
if [ $verbose -eq 1 ]
|
||||||
|
then
|
||||||
echo "$gre D - O - N - E $res"
|
echo "$gre D - O - N - E $res"
|
||||||
echo "$cya $i was checked out. A copy still exist in $HOME/Documents/.$i_tmp.back$res\n"
|
echo "$cya $i was checked out. A copy still exist in $HOME/Documents/.$i_tmp.back$res\n"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $verbose -eq 1 ]
|
if [ $verbose -eq 1 ]
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/07 15:48:24 by jhalford #+# #+# */
|
/* Created: 2017/03/07 15:48:24 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/21 18:10:21 by jhalford ### ########.fr */
|
/* Updated: 2017/03/24 14:56:11 by wescande ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -14,8 +14,9 @@
|
||||||
|
|
||||||
int plaunch_builtin(t_process *p)
|
int plaunch_builtin(t_process *p)
|
||||||
{
|
{
|
||||||
return (*p->data.cmd.execf)(
|
set_exitstatus((*p->data.cmd.execf)(
|
||||||
p->data.cmd.path,
|
p->data.cmd.path,
|
||||||
p->data.cmd.av,
|
p->data.cmd.av,
|
||||||
data_singleton()->env);
|
data_singleton()->env), 1);
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/13 22:21:19 by jhalford #+# #+# */
|
/* Created: 2017/03/13 22:21:19 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/22 18:26:53 by jhalford ### ########.fr */
|
/* Updated: 2017/03/24 14:56:32 by wescande ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ int process_launch(t_process *p)
|
||||||
if (process_redirect(p))
|
if (process_redirect(p))
|
||||||
set_exitstatus(1, 1);
|
set_exitstatus(1, 1);
|
||||||
else
|
else
|
||||||
set_exitstatus(p->map.launch(p), 1);
|
p->map.launch(p);
|
||||||
shell_resetfds();
|
shell_resetfds();
|
||||||
shell_resetsig();
|
shell_resetsig();
|
||||||
process_free(p, 0);
|
process_free(p, 0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue