Skip to content

A simple C program that replicates the pipe functionality

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

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pipex (42Porto - 42Cursus) Linux Logo C Logo 

Grade: Didn't submit

Pipex is a choice project and I've choosen minitalk; Therefore I'm unable to submit it. Done for consolidation of processes theme.

Overview:

Given command line arguments in the format: ./pipex pipex replicates the pipe functionality of the shell.

Screenshot:

Installing and running the project:

1- Clone this repository

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

2- Navigate to lvl_2_pipex and run make

cd 42_pipex/lvl_2_pipex && make

3- make clean so that you don't keep those object files that you won't need anymore

make clean

4- Run pipex with your desired arguments

./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) | [email protected]