summaryrefslogtreecommitdiff
path: root/popen3/README
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2012-09-06 14:51:09 +0200
committerTobias Klauser <tklauser@distanz.ch>2012-09-06 14:51:09 +0200
commitf81e1ad6d8e7ebaa52e98b274a4012cf8fa44862 (patch)
tree4d3383361f2832a9bc832ef8063339222596d28c /popen3/README
parentfe9fc3eaaa31ed3fd7cc7db47dfb70dcc6166969 (diff)
Add popen3 based on popenRWE (http://www.jukie.net/bart/blog/popenRWE)HEADmaster
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);