Skip to content

Commit

Permalink
Merge pull request #19 from dimadem/dimadem_signals
Browse files Browse the repository at this point in the history
fix: sigemptyset
  • Loading branch information
dimadem authored Jul 18, 2024
2 parents 7324f2d + 61b0831 commit 00a5402
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Binary file removed minishell
Binary file not shown.
Binary file removed src/.main.c.swp
Binary file not shown.
8 changes: 4 additions & 4 deletions src/signals/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/17 13:59:59 by dmdemirk #+# #+# */
/* Updated: 2024/07/18 16:09:34 by dmdemirk ### ########.fr */
/* Updated: 2024/07/18 16:42:07 by dmdemirk ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -36,7 +36,7 @@ void set_signals_interactive(void)
struct sigaction a;

sigquit_ignore();
ft_memset(&a, 0, sizeof(a));
sigemptyset(&a.sa_mask);
a.sa_handler = *signal_reset_prompt;
sigaction(SIGINT, &a, NULL);
}
Expand All @@ -51,7 +51,7 @@ void sigquit_ignore(void)
{
struct sigaction a;

ft_memset(&a, 0, sizeof(a));
sigemptyset(&a.sa_mask);
a.sa_handler = SIG_IGN;
sigaction(SIGQUIT, &a, NULL);
}
Expand All @@ -60,7 +60,7 @@ void set_signals_noninteractive(void)
{
struct sigaction a;

ft_memset(&a, 0, sizeof(a));
sigemptyset(&a.sa_mask);
a.sa_handler = &signal_print_newline;
sigaction(SIGINT, &a, NULL);
sigaction(SIGQUIT, &a, NULL);
Expand Down

0 comments on commit 00a5402

Please sign in to comment.