-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.c
More file actions
36 lines (33 loc) · 1.21 KB
/
client.c
File metadata and controls
36 lines (33 loc) · 1.21 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* client.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: davdiaz- <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/27 16:28:16 by davdiaz- #+# #+# */
/* Updated: 2025/05/27 16:31:03 by davdiaz- ### ########.fr */
/* */
/* ************************************************************************** */
#include "client.h"
t_client g_client;
void ft_signal_handler(int sig)
{
if (sig == SIGUSR1)
{
usleep(50);
if (g_client.end == 1)
{
ft_printf("SUCCESS \n");
exit(EXIT_SUCCESS);
}
ft_bit_by_bit();
return ;
}
else if (sig == SIGUSR2)
{
ft_printf("THERES WAS AN ERROR WITH THE SERVER \n");
exit(EXIT_FAILURE);
return ;
}
}