-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_pipex.h
46 lines (40 loc) · 1.47 KB
/
ft_pipex.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_pipex.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: youkim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/11 19:34:27 by youkim #+# #+# */
/* Updated: 2021/08/11 19:34:27 by youkim ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_PIPEX_H
# define FT_PIPEX_H
# define CHILD 0
# define PIPE_READ 0
# define PIPE_WRITE 1
# include <fcntl.h>
# include <stdio.h> // remove
# include <sys/wait.h>
# include "./libft/libft.h"
typedef struct s_info
{
pid_t pid;
int infd;
int outfd;
char **argslst[2];
char **envp;
} t_info;
/*
** ft_pipex
*/
void ft_pipex(int argc, char **argv, char **envp);
void ft_pipein(t_info *info, int pipefd[2]);
void ft_pipeout(t_info *info, int pipefd[2]);
/*
** pathutils
*/
char **ft_getpath(t_info *info);
void ft_exec(t_info *info, int which);
#endif