few changes before push

This commit is contained in:
Samy Ben Tayeb 2025-06-24 14:53:14 +02:00
parent b5bb9a6503
commit c395dea89d
2 changed files with 7 additions and 10 deletions

View file

@ -6,7 +6,7 @@
# By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ # # By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2025/05/02 15:40:00 by rparodi #+# #+# # # Created: 2025/05/02 15:40:00 by rparodi #+# #+# #
# Updated: 2025/06/24 12:32:31 by rparodi ### ########.fr # # Updated: 2025/06/24 14:49:42 by sben-tay ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
@ -116,13 +116,9 @@ test: debug
@tmux new-session -d -s $(SESSION) \ @tmux new-session -d -s $(SESSION) \
'bash -lc "./$(NAME) $(PORT) irc; exec bash"' 'bash -lc "./$(NAME) $(PORT) irc; exec bash"'
@tmux split-window -h -p 70 -t $(SESSION):0 \ @tmux split-window -h -p 70 -t $(SESSION):0 \
'bash -lc "irssi -c localhost -p $(PORT) -w irc || exec yes \"irssi exit code: $?\""' 'bash -lc "irssi -c localhost -p $(PORT) -w irc -n test_haut || exec yes \"irssi exit code: $?\""'
@tmux split-window -v -p 50 -t $(SESSION):0.1 \ @tmux split-window -v -p 50 -t $(SESSION):0.1 \
'bash -lc "nc localhost $(PORT) || exec yes \"netcat exit code: $?\""' 'bash -lc "irssi -c localhost -p $(PORT) -w irc -n test_bas || exec yes \"irssi exit code: $?\""'
@tmux split-window -v -p 50 -t $(SESSION):0.2 \
'bash -lc "nc localhost $(PORT) || exec yes \"netcat exit code: $?\""'
@tmux split-window -v -p 50 -t $(SESSION):0.3 \
'bash -lc "nc localhost $(PORT) || exec yes \"netcat exit code: $?\""'
@tmux attach -t $(SESSION) @tmux attach -t $(SESSION)
run: all run: all
@ -133,9 +129,9 @@ run: all
@tmux new-session -d -s $(SESSION) \ @tmux new-session -d -s $(SESSION) \
'bash -lc "./$(NAME) $(PORT) irc; exec bash"' 'bash -lc "./$(NAME) $(PORT) irc; exec bash"'
@tmux split-window -h -p 70 -t $(SESSION):0 \ @tmux split-window -h -p 70 -t $(SESSION):0 \
'bash -lc "irssi -c localhost -p $(PORT) -w irc || exec yes \"irssi exit code: $?\""' 'bash -lc "irssi -c localhost -p $(PORT) -w irc -n test_haut || exec yes \"irssi exit code: $?\""'
@tmux split-window -v -p 50 -t $(SESSION):0.1 \ @tmux split-window -v -p 50 -t $(SESSION):0.1 \
'bash -lc "nc localhost $(PORT) || exec yes \"netcat exit code: $?\""' 'bash -lc "irssi -c localhost -p $(PORT) -w irc -n test_bas || exec yes \"irssi exit code: $?\""'
@tmux attach -t $(SESSION) @tmux attach -t $(SESSION)

View file

@ -6,7 +6,7 @@
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */ /* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/13 11:11:07 by rparodi #+# #+# */ /* Created: 2025/05/13 11:11:07 by rparodi #+# #+# */
/* Updated: 2025/06/24 14:41:14 by sben-tay ### ########.fr */ /* Updated: 2025/06/24 14:51:44 by sben-tay ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -67,6 +67,7 @@ std::vector<std::string> splitLines(const std::string& input);
void Server::start() void Server::start()
{ {
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, handle_sigint); signal(SIGINT, handle_sigint);
_serverFd = socket(AF_INET, SOCK_STREAM, 0); _serverFd = socket(AF_INET, SOCK_STREAM, 0);
if (_serverFd == -1) { if (_serverFd == -1) {