Skip to content

A simple C program that replicates the UNIX pipe functionality - introduction to Inter Process Communication (IPC)

Notifications You must be signed in to change notification settings

Kuninoto/42_pipex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipex (42Porto - 42Cursus)

Showcase

Description

A simple program that replicates the UNIX pipe functionality - introduction to Inter Process Communication (IPC).

Installing and running the project

1- Clone this repository

git clone https://github.com/Kuninoto/42_pipex

2- Compile and clean the generated object files that you won't need anymore

make && make clean

3- Run pipex

./pipex <infile> <cmd1> <cmd2> <outfile>

Makefile available targets

make or make all - Makes pipex
make clean - Deletes all the resulting object files
make fclean - Deletes pipex and all the resulting object files
make re - fclean + all

Useful links

The fork() function in C
man dup, dup2
C program that demonstrates fork and pipe GeekForGeeks
Communicating between processes (using pipes) in C

Disclaimer

At 42School, almost every project must be written in accordance to the "Norm", the schools' coding standard. As a result, the implementation of certain parts may appear strange and for sure had room for improvement.


Made by Nuno Carvalho (Kuninoto) | nnuno-ca@student.42porto.com