Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benoit
minishell
Commits
dd797688
Commit
dd797688
authored
Feb 01, 2021
by
pêle-mêle
Browse files
cd leak
parent
4ef8c985
Changes
5
Hide whitespace changes
Inline
Side-by-side
file
deleted
100644 → 0
View file @
4ef8c985
inc/minishell.h
View file @
dd797688
...
...
@@ -70,7 +70,7 @@ enum e_retcode
EMPTY_CMD
};
enum
e_redir_op
enum
e_redir_op
{
NO_REDIR
,
FILEIN
,
...
...
notes.txt
View file @
dd797688
...
...
@@ -9,7 +9,6 @@ commande "."
-->Le leaks releve a la sortie d'execve ne serait pas a prendre en compte car l'os reprend la main sur les adresses de la pile du process qu'execve remplace:
https://linuxfr.org/forums/programmation-c--2/posts/free-apres-un-exec
print newline after "^C" for CTRL-C signal ("cat")
same for CTRL-\, after "^\Quit"
...
...
@@ -54,8 +53,6 @@ builtins: set stat_loc?
mkdir ok; cd ok; rmdir ../ok; pwd
cd: leaks in getcwd
strerror au lieu de perror qui est pas autorise
...
...
src/builtins/ft_cd.c
View file @
dd797688
...
...
@@ -33,8 +33,9 @@ int ft_cd(char **args, t_xe *xe)
xe
->
stat_loc
=
1
;
return
(
SUCCESS
);
//notify failure anyway ?
}
env_replace_var
(
"OLDPWD"
,
oldpwd
,
xe
);
free
(
path
);
env_replace_var
(
"OLDPWD"
,
oldpwd
,
xe
);
free
(
oldpwd
);
path
=
getcwd
(
NULL
,
0
);
env_replace_var
(
"PWD"
,
path
,
xe
);
free
(
path
);
...
...
src/ft_error.c
View file @
dd797688
...
...
@@ -3,6 +3,7 @@
#include "parsing.h"
#include <string.h> // strerror
// -> header error.h?
int
parsing_error
(
int
err_code
,
t_xe
*
xe
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment