✏️」 norm: Normed everything and leak erased from the surface of the earth and what the fuck am i doing at this hour coding i shoud be sleeping 1:30am wtf god damn please give me a bed and fuck you yosyo 🖕

This commit is contained in:
2024-07-10 01:22:28 +02:00
parent b1f77b386a
commit 54e01e9bc3
19 changed files with 359 additions and 220 deletions

38
src/exec/utils_exec_2.c Normal file
View File

@ -0,0 +1,38 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* utils_exec_2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/09 22:53:01 by adjoly #+# #+# */
/* Updated: 2024/07/09 22:57:38 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "minishell.h"
void __wait(int i)
{
while (i - 1)
{
waitpid(-1, NULL, 0);
i--;
}
}
void __close(void *content)
{
if (((t_cmd *)(content))->outfile != STDOUT_FILENO)
close(((t_cmd *)(content))->outfile);
if (((t_cmd *)(content))->infile != STDIN_FILENO)
close(((t_cmd *)(content))->infile);
}
int send_error_exec(char *input)
{
printf("minishell : command not found: %s\n", input);
free(input);
return (-1);
}