From f81e1ad6d8e7ebaa52e98b274a4012cf8fa44862 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 6 Sep 2012 14:51:09 +0200 Subject: Add popen3 based on popenRWE (http://www.jukie.net/bart/blog/popenRWE) --- popen3/README | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 popen3/README (limited to 'popen3/README') 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 + #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); -- cgit v1.2.3-54-g00ecf