refactor(signal): remove unneded function

excve already resets signal handling to the default
This commit is contained in:
Khaïs COLIN 2025-04-04 16:56:12 +02:00
parent cb8f64367d
commit 3a309062d8
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
2 changed files with 3 additions and 29 deletions

View file

@ -6,7 +6,7 @@
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/20 10:26:05 by jguelen #+# #+# */
/* Updated: 2025/04/04 14:25:35 by khais ### ########.fr */
/* Updated: 2025/04/04 16:56:06 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -85,28 +85,3 @@ int set_exec_mode_sig_handling(void)
return (-1);
return (0);
}
/*
** Can be used at the start of a child process.
** Check if necessary since execve is executed.
** @RETURN Return 0 i case of success, -1 in case of error and errno is set
** to indicate the error.
*/
int set_default_sig_handling(void)
{
struct sigaction sig;
int i;
ft_bzero(&sig, sizeof(struct sigaction));
sig.sa_handler = SIG_DFL;
if (sigemptyset(&sig.sa_mask) == -1)
return (-1);
i = 0;
while (i < NSIG)
{
if (sigaction(i, &sig, NULL) == -1)
return (-1);
i++;
}
return (0);
}