{"id":26536938,"url":"https://github.com/alaszmigiel/ipc-file-processor","last_synced_at":"2025-03-21T22:17:42.561Z","repository":{"id":283295124,"uuid":"950273635","full_name":"alaszmigiel/IPC-File-Processor","owner":"alaszmigiel","description":"Producer-Consumer system implemented with shared memory, semaphores, and signals for process synchronization.","archived":false,"fork":false,"pushed_at":"2025-03-19T13:21:28.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T14:27:24.346Z","etag":null,"topics":["c","ipc","process-communication","shared-memory","signals"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alaszmigiel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-17T22:50:56.000Z","updated_at":"2025-03-19T13:24:28.000Z","dependencies_parsed_at":"2025-03-19T14:37:37.820Z","dependency_job_id":null,"html_url":"https://github.com/alaszmigiel/IPC-File-Processor","commit_stats":null,"previous_names":["alaszmigiel/ipc-file-processor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaszmigiel%2FIPC-File-Processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaszmigiel%2FIPC-File-Processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaszmigiel%2FIPC-File-Processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaszmigiel%2FIPC-File-Processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alaszmigiel","download_url":"https://codeload.github.com/alaszmigiel/IPC-File-Processor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244875043,"owners_count":20524591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","ipc","process-communication","shared-memory","signals"],"created_at":"2025-03-21T22:17:41.949Z","updated_at":"2025-03-21T22:17:42.548Z","avatar_url":"https://github.com/alaszmigiel.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IPC File Processor\r\n\r\nThis project demonstrates an **Inter-Process Communication (IPC) system** implementing a **Producer-Consumer** model utilizing **shared memory** and **semaphores** to enable communication between multiple processes.\r\n\r\nProgram consists of three main processes:\r\n\r\n- **Process 1:** Reads a directory path from the user and sends file paths to Process 2.\r\n- **Process 2:** Encodes received paths into a hexadecimal format and forwards them to Process 3.\r\n- **Process 3:** Stores the received encoded paths in a file.\r\n\r\n### Signal Controls\r\n\r\nThrough **signal handling**, the user can:\r\n- **Terminate** the entire application (`SIGUSR1`) by sending it to **any process**.\r\n- **Pause** (`SIGQUIT`) and **resume** (`SIGCONT`) execution, sent **to worker processes**.\r\n- **Enable or disable encoding** (`SIGUSR2`), sent **to worker processes**.\r\n\r\n## System Requirements\r\n\r\nThis program is designed to run on **Linux** or **macOS**. \r\n\r\nIf you are using **Windows**, you need to run it inside a **Linux virtual machine** (e.g. VirtualBox).\r\n\r\n## Technical Requirements\r\n- C compiler \r\n\r\n## Installation \u0026 Usage\r\n\r\n### 1. Clone the repository:\r\n```sh\r\ngit clone https://github.com/alaszmigiel/IPC-File-Processor.git\r\ncd IPC-File-Processor\r\n```\r\n\r\n### 2. Compile the program:\r\n```sh\r\nmake\r\n```\r\n\r\n### 3. Run the program:\r\n```sh\r\nmake run\r\n```\r\n\r\n### 4. Control execution with signals:\r\n\r\nOpen a **new terminal window** and use the following commands to control the process:\r\n\r\n```sh\r\nkill -SIGUSR1 \u003cpid\u003e   # Terminate the entire application (can be sent to any process)\r\nkill -SIGQUIT \u003cworker_pid\u003e  # Pause execution (sent to worker processes)\r\nkill -SIGCONT \u003cworker_pid\u003e  # Resume execution (sent to worker processes)\r\nkill -SIGUSR2 \u003cworker_pid\u003e  # Toggle encoding mode (sent to worker processes)\r\n```\r\n\r\n### 5. Clean up (Remove compiled files):\r\n\r\nTo remove all generated object files (`.o`) and binaries, run:\r\n\r\n```sh\r\nmake clean\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falaszmigiel%2Fipc-file-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falaszmigiel%2Fipc-file-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falaszmigiel%2Fipc-file-processor/lists"}