summaryrefslogtreecommitdiff
path: root/popen3/README
diff options
context:
space:
mode:
Diffstat (limited to 'popen3/README')
-rw-r--r--popen3/README20
1 files changed, 20 insertions, 0 deletions
diff --git a/popen3/README b/popen3/README
new file mode 100644
index 0000000..e614fc4
--- /dev/null
+++ b/popen3/README
@@ -0,0 +1,20 @@
+example usage:
+
+ #include <unistd.h>
+ #include "popen3.h"
+
+ int pipes[3];
+ pid_t pid;
+ int ret;
+
+ const char *cmd = "cat -n";
+
+ pid = popen3(cmd, pipes);
+
+ /*
+ * - write to pipes[0] will go to stdin of cat
+ * - read from pipes[1] to get stdout of cat
+ * - read from pipes[2] to get stderr of ct
+ */
+
+ ret = pclose3(pid, pipes);