-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_close.c
20 lines (18 loc) · 1.02 KB
/
ft_close.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_close.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abenamar <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/13 12:25:46 by abenamar #+# #+# */
/* Updated: 2023/09/13 12:27:08 by abenamar ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int ft_close(int fd)
{
if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO)
return (close(fd));
return (-1);
}