diff options
[SP/P08] Solved exercises
1 files changed, 16 insertions, 0 deletions
| -rw-r--r-- | Year 3/System programming/Practice08/ex1.c | 16 |
diff --git a/Year 3/System programming/Practice08/ex1.c b/Year 3/System programming/Practice08/ex1.c new file mode 100644 index 0000000..63ee62e --- /dev/null +++ b/Year 3/System programming/Practice08/ex1.c @@ -0,0 +1,16 @@ +#include <signal.h> +#include <stdio.h> +#include <unistd.h> + +int main() { + signal(SIGPIPE, SIG_IGN); + + int filedes[2]; + pipe(filedes); + close(filedes[0]); + + write(filedes[1], "aba\n", 4); + write(1, "mnm\n", 4); + + return 0; +} |
