top of page

Commando

Introduction

In computing, a shell is a user interface for access to an operating system's services. In general, operating system shells use either a command-line interface (CLI) or a graphical user interface (GUI), depending on a computer's role and particular operation. It is named a shell because it is the outermost layer around the operating system kernel.

CLI shells require the user to be familiar with commands and their calling syntax and to understand concepts about the shell-specific scripting language (for example bash). (Wikipedia: Shell)

Purpose

The project is used for

- understanding the basic interface of the Linux System,

- implementing multi-process control,

- applied the Linux pipe system,

- mimicking the Linux Shell system

Design

Generally, the program will accept a command, if it is a built-in command, the shell will recognize it and do the task; if the command is not a built-in command, the program will call some function to execute the command from the system. Then, all of the results will be stored in the program until the user uses a command to check the result. In the beginning, I only change the standard output file descriptor of the child process to the new file descriptor; thus, some errors will be printed on the screen directly. To fix the error, I also redirect the standard error output to the parent process.

bottom of page