fix: signals (^C in $ cat)

This commit is contained in:
mcolonna 2024-06-28 12:55:55 +02:00
parent 368b46e82c
commit 3f3028880b
5 changed files with 28 additions and 26 deletions

View file

@ -6,7 +6,7 @@
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
/* Updated: 2024/06/13 13:08:35 by mcolonna ### ########.fr */
/* Updated: 2024/06/28 12:55:17 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,6 +15,13 @@
# include "include.h"
void handle_signals(void);
typedef enum e_sigmode {
SIGMODE_PROMPT, SIGMODE_IGNORE, SIGMODE_DEFAULT
} t_sigmode;
// If sigmode is SIGMODE_PROMPT, ^C redisplays the prompt and ^\ is ignored.
// If sigmode is SIGMODE_IGNORE, ^C and ^\ are ignored.
// If sigmode is SIGMODE_DEFAULT, ^C and ^\ are reset by default.
void handle_signals(t_sigmode sigmode);
#endif