File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 3
3
/* ::: :::::::: */
4
4
/* pwd.c :+: :+: :+: */
5
5
/* +:+ +:+ +:+ */
6
- /* By: lyeh <lyeh @student.42vienna.com> +#+ +:+ +#+ */
6
+ /* By: ldulling <ldulling @student.42.fr> +#+ +:+ +#+ */
7
7
/* +#+#+#+#+#+ +#+ */
8
8
/* Created: 2024/03/18 17:40:16 by lyeh #+# #+# */
9
- /* Updated: 2024/03/18 17:40:17 by lyeh ### ########.fr */
9
+ /* Updated: 2024/06/01 12:25:09 by ldulling ### ########.fr */
10
10
/* */
11
11
/* ************************************************************************** */
12
12
@@ -21,7 +21,10 @@ int exec_pwd(void)
21
21
{
22
22
print_error ("%s: %s: " , PROGRAM_NAME , "pwd" );
23
23
perror (NULL );
24
- return (CMD_EXEC_FAILED );
24
+ if (errno == ENOMEM )
25
+ return (MALLOC_ERROR );
26
+ else
27
+ return (GENERAL_ERROR );
25
28
}
26
29
ft_printf ("%s\n" , pwd );
27
30
free (pwd );
You can’t perform that action at this time.
0 commit comments