here_doc script_fd fix

+ line_len in here_doc
+ error message SIGQUIT
This commit is contained in:
lperrey
2021-12-22 15:57:02 +01:00
parent b51535cdbc
commit 523f560eab
9 changed files with 46 additions and 152 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
/* Updated: 2021/12/20 14:23:40 by hulamy ### ########.fr */
/* Updated: 2021/12/22 15:03:31 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -23,11 +23,6 @@ static int handle_access_error(char *file_name);
* #tag_18_08_02
*/
/*
* TODO : faire des test sur la valeur de errno selon les cas (if directory, if
* pathname invalid, ...)
*/
int cmd_find_access(t_cmd *cmd, char *path[])
{
if (ft_strchr(cmd->argv[0], '/'))

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
/* Updated: 2021/12/21 17:29:39 by lperrey ### ########.fr */
/* Updated: 2021/12/22 15:38:01 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -48,7 +48,9 @@ static void handle_signal_status(int wstatus)
signum = WTERMSIG(wstatus);
set_last_exit_status(EXIT_SIGNAL + signum);
if (signum == SIGINT)
write(STDIN_FILENO, "\n", 1);
write(STDOUT_FILENO, "\n", 1);
if (signum == SIGQUIT)
ft_putstr_fd("Quit (core dumped)\n", STDERR_FILENO);
}
static int handle_wait_error(void)