{"id":20383586,"url":"https://github.com/ygor-sena/42cursus-minitalk","last_synced_at":"2025-10-04T07:55:37.774Z","repository":{"id":68497855,"uuid":"534361735","full_name":"ygor-sena/42cursus-minitalk","owner":"ygor-sena","description":"The sixth project of 42's curriculum asks students to code a small data exchange program using UNIX signals.","archived":false,"fork":false,"pushed_at":"2024-04-04T16:41:42.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-24T04:35:36.794Z","etag":null,"topics":["42","42cursus","42minitalk","42saopaulo","42school","42sp","ansi-c","c","ecole42","signal-processing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ygor-sena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-09-08T19:21:37.000Z","updated_at":"2023-07-08T09:18:31.000Z","dependencies_parsed_at":"2024-11-15T02:24:31.427Z","dependency_job_id":"780a7cbd-e334-426c-8fec-300a01ccb3f6","html_url":"https://github.com/ygor-sena/42cursus-minitalk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ygor-sena/42cursus-minitalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-minitalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-minitalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-minitalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-minitalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ygor-sena","download_url":"https://codeload.github.com/ygor-sena/42cursus-minitalk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-minitalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278283453,"owners_count":25961311,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["42","42cursus","42minitalk","42saopaulo","42school","42sp","ansi-c","c","ecole42","signal-processing"],"created_at":"2024-11-15T02:23:27.880Z","updated_at":"2025-10-04T07:55:37.758Z","avatar_url":"https://github.com/ygor-sena.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/102881479/215282296-839ce5e6-5982-41f6-ba56-7e408f6ca9f8.png\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/OS-Linux-blue\" alt=\"OS\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Language-C%20%7C%20C%2B%2B-blue.svg\" alt=\"Language\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Grade-125%2F100-brightgreen.svg\" alt=\"Grade\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Status-Completed-brightgreen.svg\" alt=\"Status\"\u003e\n\u003c/p\u003e\n\n## 📣 Introduction\n\nThe purpose of this project is to code a small data exchange program using UNIX signals. Therefore, the communication program between a `client` and a `server` has to be done using **only** UNIX signals. Thus, it was allowed to use only two signals: `SIGUSR1` and `SIGUSR2`.\n\nThe `server` should be able to receive strings from several clients in a row without needing to restart. For the bonus project, the `server` also acknowlegdes every message received by sending back a signal to the `client` and supports Unicode characters.\n\n## ⚒️ How to compile and run the project\n\n#### 1) Copy this repository to your local workstation\n\n```html\ngit clone git@github.com:ygor-sena/42cursus-minitalk.git\n```\n\n#### 2) Compile the project with Makefile\n\n```html\nmake\n```\n\n#### 3) Open two instances of the command terminal and, in one of them, launch the `server` program\n\n```html\n./server\n```\n\nIt will print something to the standard output, such as:\n\n```html\nServer PID is: 1084.\n```\n\nIf you want to run the program looking for memory leaks, just start it as follows:\n\n```html\nvalgrind --leak-check=full --show-leak-kinds=all ./server\n```\n\n#### 4) In the other terminal, launch the `client` program\n\nIt must receive the following three arguments: the executable program, the server PID and the text to be sent. For example:\n\n```html\n./client 1024 \"This is an amazing but not so long sentence, minitalk!\"\n```\n\n#### 5) Usage example\n\nAfter completing the four steps above, the `server` will receive and print the message from `client`. After the message has been fully printed, the `server` will send a message back to the `client` signaling that data has been successfully received. The `client` will then show the following information:\n\n```html\n1084 server PID: data received.\n```\n\nTo send another message to the `server`, the `client` program must be executed once again.\n\n## 📖 References\n\n- About Unicode characters:\n\n  - [The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)](https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/) by Joel Spolsky.\n  - [Unicode in C and C++: What You Can Do About It Today](https://www.cprogramming.com/tutorial/unicode.html) by Jeff Bezanson.\n  - [Unicode character table](https://unicode-table.com/en/) searcher to easily get Unicode characters.\n\n- About signals:\n\n  - [Introduction To Unix Signals Programming](https://www.cs.kent.edu/~ruttan/sysprog/lectures/signals.html) by [Kent State University](https://www.kent.edu/cs).\n  - [signal handler sa_sigaction arguments](https://stackoverflow.com/questions/12587621/signal-handler-sa-sigaction-arguments) by StackOverflow.\n  - [How can I translate from Decimal to binary and send it with sigusr 1-2?](https://stackoverflow.com/c/42network/questions/1919/1920#1920) by 42 Network StackOverflow.\n\n- About bit shift manipulation (**this video is amazing!**):\n  - [Bit Manipulation](https://www.youtube.com/watch?v=7jkIUgLC29I) by [Make School](https://www.youtube.com/@MakeSchoolCS).\n\n- BRYANT, Randal; O'HALLARON, David. _Computer Systems: a programmer's perspective_. 3rd edition, 2016. \n  - Source code of the book examples: https://csapp.cs.cmu.edu/3e/code.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygor-sena%2F42cursus-minitalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fygor-sena%2F42cursus-minitalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygor-sena%2F42cursus-minitalk/lists"}