summaryrefslogtreecommitdiff
path: root/popen3/README
blob: e614fc410ccfed6d601f605bf805c12574d226da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);