Skip to content

xtrm0/par-shell

Repository files navigation

Version Info

Operating Systems Project - par-shell

A parallel shell

========= This project was brought to you by:

Número:_80980; Nome:____David_Calhas; Curso:__LEIC;

Número:_81061; Nome:____Miguel_Renda; Curso: __LEIC;

Número:_81861; Nome:___Afonso_Tinoco; Curso:__LEIC;

Files:

terminal.c

Front end terminal program (compiles to par-shell-terminal). This cli sends commands for the par-shell server to run.

main.c

Server application launcher (compiles to par-shell). This listens for commands, executes programs, and sends messages to currently running par-shell-terminals.

processList.[ch]

Manager library for currently running subprocesses (threadsafe)

terminalList.[ch]

Manager library for currently connected terminals (non-threadsafe)

commandlinereader.[ch]

Lib provided by teachers to read commands from the terminal.

defines.h

Useful #defines to make safety checks less bulky

How to compile:

Just run make:

  make clean
  make all

How to run:

To start the server type:

% ./par-shell

A abrir o pipe /tmp/par-shell-in-PmBaoW/par-shell-in para leitura...

(This pipe is unique per run (it is generated by mktemp))

Then, to start any client, just type:

% ./par-shell-terminal  /tmp/par-shell-in-PmBaoW/par-shell-in

/home/username/SO/par-shell$

Note that we start every application with the PATH equal to the current working directory (.). So, in order to run, for instance, ls, you have to run /bin/ls instead of ls (as /bin is not on the PATH)