-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminitalk.h
38 lines (32 loc) · 1.34 KB
/
minitalk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* minitalk.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchow-so <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/10 10:39:38 by tchow-so #+# #+# */
/* Updated: 2024/11/10 10:58:14 by tchow-so ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MINITALK_H
# define MINITALK_H
# define PAUSE 100
# include <stdbool.h>
# include <signal.h>
# include <sys/types.h>
# include <unistd.h>
# include <stdlib.h>
# include "libft/libft/libft.h"
# include "libft/ft_printf/ft_printf.h"
typedef struct s_msg
{
unsigned int len;
bool active;
char *str;
} t_msg;
void printerr_exit(char *str);
void block_signals(struct sigaction *sa);
void set_sigaction(struct sigaction *sa);
void send_bit(pid_t pid, int bit);
#endif