Update: stdme/os module

This commit is contained in:
Maieul BOYER 2024-04-29 15:12:51 +02:00
parent dfb10f3390
commit 16f49181b5
No known key found for this signature in database
37 changed files with 1201 additions and 345 deletions

24
stdme/src/os/pipe.c Normal file
View file

@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pipe.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/04 17:59:48 by maiboyer #+# #+# */
/* Updated: 2024/01/04 18:01:42 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/os/pipe.h"
t_error create_pipe(t_pipe *out)
{
t_file fds[2];
if (pipe(fds))
return (ERROR);
out->read = fds[0];
out->write = fds[1];
return (NO_ERROR);
}