diff --git a/ASR3.1/TP06 Redirection tubes / pipe-ex.c b/ASR3.1/TP06 Redirection tubes / pipe-ex.c index 55ebcb0..dc1d3c9 100644 --- a/ASR3.1/TP06 Redirection tubes / pipe-ex.c +++ b/ASR3.1/TP06 Redirection tubes / pipe-ex.c @@ -18,7 +18,7 @@ int main(int argc, char const *argv[]){ /*pf1f1*/ if (fork() == 0) { - read(p[0], &pid, 1 ); + read(p[0], &pid, sizeof(pid_t) ); while (1) { sleep(3); @@ -36,7 +36,7 @@ int main(int argc, char const *argv[]){ //printf("while ok\n"); - write (p[1], &pid, 1); + write (p[1], &pid, sizeof(pid_t)); close (p[1]);