summaryrefslogtreecommitdiffstats
path: root/src/e_pipes.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-28 01:26:44 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-28 01:26:44 +0100
commitf6faf88cd0991be3184af67d5fa271b12f70e925 (patch)
tree02c283541fd2c0b4ccacd31172cccf2ba9711c51 /src/e_pipes.c
parentNorming in progress (diff)
download42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.gz
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.bz2
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.xz
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.zst
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.zip
Norming
Diffstat (limited to 'src/e_pipes.c')
-rw-r--r--src/e_pipes.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/e_pipes.c b/src/e_pipes.c
index 4ad9e46..c55d46d 100644
--- a/src/e_pipes.c
+++ b/src/e_pipes.c
@@ -29,8 +29,8 @@
#include "u_path.h"
static unsigned char e_get_current_path(char fullpath[],
- struct s_lpipes *ptr,
- t_msh *msh)
+ struct s_lpipes *ptr,
+ t_msh *msh)
{
unsigned char fp_ret;
@@ -57,15 +57,15 @@ static unsigned char e_get_current_path(char fullpath[],
** TODO: handle fork() failed, etc
*/
-static int e_unroll_pipes(int fd[256][2],
- size_t pipes,
- t_msh *msh)
+static int e_unroll_pipes(int fd[256][2],
+ size_t pipes,
+ t_msh *msh)
{
struct s_lpipes *head;
char fullpath[PATH_MAX];
- int pid;
- unsigned short i;
- unsigned char fp_ret;
+ int pid;
+ unsigned short i;
+ unsigned char fp_ret;
head = msh->pipes;
i = 0;
@@ -91,11 +91,11 @@ static int e_unroll_pipes(int fd[256][2],
** TODO: error mgmnt
*/
-static void e_pipe_exec(size_t pipes, t_msh *msh)
+static void e_pipe_exec(size_t pipes, t_msh *msh)
{
- int fd[256][2];
- int pid;
- int status;
+ int fd[255][2];
+ int pid;
+ int status;
unsigned short i;
i = 0;
@@ -116,7 +116,7 @@ static void e_pipe_exec(size_t pipes, t_msh *msh)
msh->ret = WEXITSTATUS(status);
}
-void e_pipes(t_msh *msh)
+void e_pipes(t_msh *msh)
{
const size_t pipes = e_get_pipes_count(msh->pipes);