<p>How should I run another program from within my <code>C</code> program? I need to be able to write data into <code>STDIN</code> of the launched program (and maybe read from it's <code>STDOUT</code>)</p>

<p>I am not sure if this is a standard C function. I need the solution that should work under Linux.</p>

You want to use
```
popen
```
. It gives you a unidirectional pipe with which you can access stdin and stdout of the program.
popen is standard on modern unix and unix-like OS, of which Linux is one :-)
Type
```
```
man popen
```
```
in a terminal to read more about it.
EDIT
Whether
```
popen
```
produces unidirectional or bidirectional pipes depends on the implementation. In
Linux
and
OpenBSD
,
```
popen
```
produces unidirectional pipes, which are read-only or write-only. On
OS X
,
FreeBSD
and
NetBSD
```
popen
```
produces bidirectional pipes.