Skip to content

YusufKhan-gamedev/smallshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small Shell

A shell in C. It implements a subset of features of bash.

Features

  1. Use Unix process API to create and manage processes.
    • fork() to create a new create process
    • execvp() to run a different program that is the user input command
    • waitpid() to check for the termination of the child process, and clean up resources from child processes
    • getpid() to get the process id
    • getenv() to get environment variable
  2. Support input and output redirection using dup2() system call
  3. Switch between foreground-only and foreground-and-background
  4. Expand any instance of "$$" in a command into the process ID
  5. Implement custom handlers to override 2 signals, SIGINT and SIGTSTP
  6. Used valgrind to ensure memory-leak free



demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published