17 lines
338 B
C
17 lines
338 B
C
|
///********************/
|
||
|
///* demo_pipe : ... */
|
||
|
///********************/
|
||
|
# include <stdio.h>
|
||
|
# include <unistd.h>
|
||
|
|
||
|
char string[] = "hello";
|
||
|
int main()
|
||
|
{ char buf[70];
|
||
|
int fds[2];
|
||
|
pipe (fds);
|
||
|
write(fds[1], string, 6);
|
||
|
read (fds[0], buf, 6);
|
||
|
printf ("Chaine provenant du pipe-line : %s \n", buf);
|
||
|
return 0;
|
||
|
}
|