Command line modified sort command.
Semaphores_Processes has not produced any errors so far on UNIX systems. It has been designed and tested on Ubuntu Flavour version 23.10 x86_64.
If you face a situation full of errors, please contact the maintainers.
- Features
- Requirements
- Installation
- Basic usage
- Alternative usage (Optional)
- Error codes
- Reporting bugs
- License
- Authors
Semaphores_Processes provides the following features:
- Display on standard output, and in a file, 3 different messages from 3 processes with the 2nd process appearing at most once more than the 1st and the 1st process appearing at most once more than the 3rd.
- Easy error detection.
-
Unix based OS's
- GCC Compiler
- makefile
Clone the above repository locally on your computer, open the src folder, run the command 'make' in the terminal, and finally, execute the command ./Semaphores_Processes.
After a successful cloning and compiling, the command to execute it:
./Semaphores_Processes
This will display the usage of helper program's window with a list of options.
If you prefer not to use the command via ./Semaphores_Processes, there is also an alternative usage:
-
You need to save the
srcfolder to a specific location within your system where you believe it won't be altered. -
Open the terminal within the directory
srcand issue the following commandpwd, it will display the current working directory, showing the full path. -
Copy the full path that the terminal displayed to you and open another terminal window.
-
Issue the command:
nano ~/.bashrcto insert the path from the main file. -
Insert the following command at the end of the file (.bashrc):
export PATH=$PATH:/home/username/Semaphores_Processes/src/
Warning: You need to replace the username with the name you are using!
-
After issuing the above command, press
CTRL + Oto save, then pressENTER, and finally, pressCTRL + Xto exit the .bashrc file. -
Finally, execute the following command:
source ~/.bashrcto update the .bashrc file so that you can run theSemaphores_Processescommand.
Semaphores_Processes has an integrated error system with numerical codes. Each code corresponds to a string explaining the error. Below, you will find the table of possible errors:
| Exit code | Description |
|---|---|
| 0 | SUCCESS |
| 1 | ERROR_CREATING_PROCESS_1 |
| 2 | ERROR_CREATING_PROCESS_2 |
| 3 | ERROR_CREATING_PROCESS_3 |
| 4 | ERROR_OPENING_FILE |
Exit Code 0: If your program returns exit code 0 after execution, it means that it ran without any issues. :D
Exit Code 1: If your program returns exit code 1 after execution, it means that it refers to the error arising from the unsuccessful creation of child process 1
Exit Code 2: If your program returns exit code 2 after execution, it means that it refers to the error arising from the unsuccessful creation of child process 2
Exit Code 3: If your program returns exit code 3 after execution, it means that it refers to the error arising from the unsuccessful creation of child process 3
Exit Code 4: If your program returns exit code 4 after execution, it means that it refers to the error arising from the unsuccessful opening of the file for outputting data from the program.
When a bug is found, please do report it by opening an issue at github, as already stated above.
In your report you should, at the very least, state your Linux version, GCC version, Kernel version and CPU version (x86 or x64) of installation.
A simple screenshot of your terminal output would be preferable by issuing the following command: neofetch
Warning: As you can see in the above screenshot, it does not include the correct information required because the program is running on a virtual machine and cannot display the real components of the computer.
MIT License
Copyright (c) 2024 Spyridon Eftychios Kokotos & Christos Spyridon Karydis
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above program is a creation of Spyros Kokotos - inf2021098@ionio.gr & Christos Karydis - inf2022076@ionio.gr, and you can use it for your personal projects or further develop it as long as you always give credit to the creators.

