signaux fonctionnent sur test
This commit is contained in:
@@ -3,8 +3,21 @@
|
||||
|
||||
int builtin_unset(int argc, char *argv[], t_all *c)
|
||||
{
|
||||
int position;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
(void)c;
|
||||
position = getenv_position(c->envp, argv[1]);
|
||||
if (position == -1)
|
||||
return (0);
|
||||
while (c->envp[position])
|
||||
{
|
||||
write(1, "1", 1);
|
||||
free(c->envp[position]);
|
||||
c->envp[position] = ft_strdup(c->envp[position + 1]);
|
||||
position++;
|
||||
}
|
||||
write(1, "2", 1);
|
||||
free(c->envp[position]);
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user