> For the complete documentation index, see [llms.txt](https://42-guide.gitbook.io/42-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://42-guide.gitbook.io/42-guide/core-curriculum/rank-02/integrations.md).

# Mini Talk

## Minitalk - 42 Project Detailed Explanation

Minitalk is a project at 42 that introduces inter-process communication (IPC) using signals in UNIX-like systems. The goal is to implement a simple messaging system where a client sends messages to a server using UNIX signals.

***

## UNIX Signal Communication - Project

### Mandatory Requirements

#### Program Structure:

Create two programs:

1. **Server**:
   * Runs first.
   * Displays its Process ID (PID) on launch.
2. **Client**:
   * Accepts two parameters:
     * The server's PID.
     * A string to send.
   * The client sends the string to the server, which prints it upon receipt.

#### Communication:

* Exclusively use **UNIX signals** for communication.
* Allowed signals: `SIGUSR1` and `SIGUSR2`.
* The server must process signals efficiently (e.g., displaying 100 characters within 1 second).

#### Error Handling:

* No unexpected program crashes (e.g., segmentation faults, memory leaks).
* Proper handling of memory allocation and release.

#### Concurrency:

* The server should support multiple clients sending messages consecutively without requiring a restart.

#### Functions Allowed:

* `write`
* `ft_printf` (or an equivalent self-coded function)
* `signal`, `sigemptyset`, `sigaddset`, `sigaction`
* `kill`
* `getpid`
* `malloc`, `free`
* `pause`, `sleep`, `usleep`
* `exit`

### Bonus Requirements

The bonus will only be evaluated if the **mandatory part** is flawless.

#### Acknowledgment:

* Server sends a signal back to the client after receiving a message.

#### Unicode Support:

* Extend functionality to handle Unicode characters.

### Development Rules

#### Code Norms:

* Must adhere to the **Norm** (coding style guide). Any violations result in failure.

#### Makefile:

* Required with targets:
  * `all`
  * `clean`
  * `fclean`
  * `re`
  * Optionally: `bonus`.
* Use flags:
  * `-Wall -Wextra -Werror`.

#### Memory Management:

* No leaks are permitted; all dynamically allocated memory must be freed.

### Forbidden Practices:

* Using functions or libraries beyond those explicitly allowed.
* Relying on more than one global variable per program unless justified.
* Including bonus functionality in the same files as the mandatory part.

### Submission Guidelines:

* Submit the project via your assigned Git repository.
* Only files in the repository will be graded.
* Errors during evaluation by **Deepthought** will result in the evaluation stopping.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://42-guide.gitbook.io/42-guide/core-curriculum/rank-02/integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
