From c395dea89da45c0aa9e9418da657bb3899c525db Mon Sep 17 00:00:00 2001 From: Samy Ben Tayeb Date: Tue, 24 Jun 2025 14:53:14 +0200 Subject: [PATCH] few changes before push --- Makefile | 14 +++++--------- sources/core/Server.cpp | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index fd4e17d..0debbc4 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: sben-tay +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # 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) \ 'bash -lc "./$(NAME) $(PORT) irc; exec bash"' @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 \ - 'bash -lc "nc localhost $(PORT) || exec yes \"netcat 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: $?\""' + 'bash -lc "irssi -c localhost -p $(PORT) -w irc -n test_bas || exec yes \"irssi exit code: $?\""' @tmux attach -t $(SESSION) run: all @@ -133,9 +129,9 @@ run: all @tmux new-session -d -s $(SESSION) \ 'bash -lc "./$(NAME) $(PORT) irc; exec bash"' @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 \ - '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) diff --git a/sources/core/Server.cpp b/sources/core/Server.cpp index 26bec2b..75d2475 100644 --- a/sources/core/Server.cpp +++ b/sources/core/Server.cpp @@ -6,7 +6,7 @@ /* By: sben-tay +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 splitLines(const std::string& input); void Server::start() { + signal(SIGQUIT, SIG_IGN); signal(SIGINT, handle_sigint); _serverFd = socket(AF_INET, SOCK_STREAM, 0); if (_serverFd == -1) {