From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/FUNCTIONS/pipe.html | 100 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 reference/C/FUNCTIONS/pipe.html (limited to 'reference/C/FUNCTIONS/pipe.html') diff --git a/reference/C/FUNCTIONS/pipe.html b/reference/C/FUNCTIONS/pipe.html new file mode 100644 index 0000000..5f2682c --- /dev/null +++ b/reference/C/FUNCTIONS/pipe.html @@ -0,0 +1,100 @@ +pipe function + + + + + + +
+
+

pipe function

+
+
+

+pipe creates two file descriptors which can be used by +parent and child processes to communicate data. A child process can +be created with the fork function. +

+


+
+ + + + +
+
+
+	Library:   unistd.h
+
+	Prototype: int pipe(int fd[2]);
+
+	Syntax:    int fd[2];
+		   pipe(fd);
+
+
+
+

+


+On error, pipe returns -1.

+Once the pipe has been executed, the data can be transfered +using read and +write. +


+

Notes:

+Make sure that when you read +exactly the same number of bytes that are +written! I spend HOURS +trying to figure out why I was loosing data because of this feature!! +
+

Examples:

+ + + read and write fixed length records. +

+ + + read and write variable length records. + +


+

See Also:

+ + +fork

+ +popen function.

+ +pclose function.

+ + +read function.

+ + +write function.

+ + +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + -- cgit v1.2.3-54-g00ecf