mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
Norm: Removed most comments.
This commit is contained in:
parent
a7f09137ee
commit
8b43fd2411
59 changed files with 114 additions and 1113 deletions
|
|
@ -3,10 +3,10 @@
|
|||
/* ::: :::::::: */
|
||||
/* sig.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* By: jguelen <jguelen@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/02 12:16:37 by kcolin #+# #+# */
|
||||
/* Updated: 2025/05/02 12:18:17 by kcolin ### ########.fr */
|
||||
/* Updated: 2025/05/02 13:01:42 by jguelen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -14,19 +14,8 @@
|
|||
#include "signal.h"
|
||||
#include "sig_handlers.h"
|
||||
|
||||
/*
|
||||
** g_signum exists to store the value of a signal if relevant for later
|
||||
** processing.
|
||||
** NOTE: g_signum starts at 0 and should be set back to 0 after the information
|
||||
** it stores has been properly processed.
|
||||
*/
|
||||
int g_signum = 0;
|
||||
|
||||
/*
|
||||
** Catches SIGINT and SIGQUIT.
|
||||
** Set to ignore SIGQUIT and catch SIGINT to set g_signum for
|
||||
** further processing when in interactive mode.
|
||||
*/
|
||||
int set_interactive_mode_sig_handling(void)
|
||||
{
|
||||
struct sigaction sig_act;
|
||||
|
|
@ -44,11 +33,6 @@ int set_interactive_mode_sig_handling(void)
|
|||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
** Set to ignore SIGINT and SIGQUIT signals if they are generated through
|
||||
** a call to kill when the program is currently executing commands.
|
||||
** Otherwise set g_signum to the number corresponding to the caught signal.
|
||||
*/
|
||||
int set_exec_mode_sig_handling(void)
|
||||
{
|
||||
struct sigaction sig_act;
|
||||
|
|
@ -66,11 +50,6 @@ int set_exec_mode_sig_handling(void)
|
|||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
** Set to ignore SIGINT and SIGQUIT signals if they are generated through
|
||||
** a call to kill when the program is currently executing commands.
|
||||
** Otherwise set g_signum to the number corresponding to the caught signal.
|
||||
*/
|
||||
int set_here_doc_mode_sig_handling(void)
|
||||
{
|
||||
struct sigaction sig_act;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue