https://github.com/taisiabarteneva/pipex
Implementation of a mechanism for inter-process communication in a shell
https://github.com/taisiabarteneva/pipex
c multiprocessing pipeline systemcalls
Last synced: 4 days ago
JSON representation
Implementation of a mechanism for inter-process communication in a shell
- Host: GitHub
- URL: https://github.com/taisiabarteneva/pipex
- Owner: taisiabarteneva
- Created: 2022-02-10T11:33:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-08T17:05:52.000Z (almost 4 years ago)
- Last Synced: 2025-02-28T22:51:09.510Z (over 1 year ago)
- Topics: c, multiprocessing, pipeline, systemcalls
- Language: C
- Homepage:
- Size: 1.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pipex
#### 42 school project
The goal of the project is to implement a pipe functionality, using unix system calls `fork`, `pipe`, `execve` and `dup2`
See `subject.pfd` in the root of the repository to get more detailed info about the project
### How to build
```
$ make
```
The program handles multiple commands. Program execution
```
$ ./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2
```
is equivalent to
```
$ < file1 cmd1 | cmd2 | cmd3 ... | cmdn > file2
```
I also implemented **heredoc syntax**. It works as follows
```
$ ./pipex cmd << LIMITER | cmd1 >> file | cmd2 | cmd3
```