diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2012-09-06 14:51:09 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2012-09-06 14:51:09 +0200 |
commit | f81e1ad6d8e7ebaa52e98b274a4012cf8fa44862 (patch) | |
tree | 4d3383361f2832a9bc832ef8063339222596d28c /popen3/README | |
parent | fe9fc3eaaa31ed3fd7cc7db47dfb70dcc6166969 (diff) |
Diffstat (limited to 'popen3/README')
-rw-r--r-- | popen3/README | 20 |
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); |