/* ************************************************************************** */
/*                                                                            */
/*                                                        ::::::::            */
/*   signal_init.c.c                                    :+:    :+:            */
/*                                                     +:+                    */
/*   By: whaffman <whaffman@student.codam.nl>         +#+                     */
/*                                                   +#+                      */
/*   Created: 2025/02/26 15:39:01 by whaffman      #+#    #+#                 */
/*   Updated: 2025/02/26 15:39:46 by whaffman      ########   odam.nl         */
/*                                                                            */
/* ************************************************************************** */

#include "minishell.h"

void	signal_init_minishell(void)
{
	signal(SIGINT, sigint_minishell_handler);
	signal(SIGQUIT, SIG_IGN);
}

void	signal_init_parent(void)
{
	signal(SIGINT, sig_parent_handler);
	signal(SIGQUIT, sig_parent_handler);
}

void	signal_init_child(void)
{
	signal(SIGINT, SIG_DFL);
	signal(SIGQUIT, SIG_DFL);
}

void	signal_init_heredoc(void)
{
	signal(SIGINT, sigint_heredoc_handler);
	signal(SIGQUIT, SIG_IGN);
}
