Skip to content

merijnjong/pipex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipex

Write a program in C that mimics the usage of UNIX mechanisms with system calls only.

Program name pipex
Turn in files Makefile, pipex.h, pipex.c, pipex_utils.c
Makefile NAME, all, clean, fclean, re
Arguments file1 cmd1 cmd2 file2
External functions • open, close, read, write, malloc, free, perror, strerror, access, dup, dup2,
    execve, exit, fork, pipe, unlink, wait, waitpid
• ft_printf and any equivalent YOU coded
Libft authorized Yes

Instructions

Your program will be executed as follows:
    ./pipex file1 cmd1 cmd2 file2

It must take 4 arguments:

  • file1 and file2 are file names.
  • cmd1 and cmd2 are shell commands with their parameters.

Examples

Requirements

Your project must comply with the following rules:

  • You have to turn in a Makefile which will compile your source files. It must not relink.
  • You have to handle errors thoroughly. In no way your program should quit unexpectedly
    (segmentation fault, bus error, double free, and so forth).
  • Your program mustn’t have memory leaks.
  • If you have any doubt, handle the errors like the shell command:
        < file1 cmd1 | cmd2 > file2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published