<p>I have this program, we'll call it Host. Host does all kinds of good stuff, but it needs to be able to accept input through the command line <strong>while it's running</strong>. This means it has to somehow send its other process data and then quit. For example, I need to be able to do this:</p>

<pre><code>./Host --blahblah 3 6 3 5
</code></pre>

<p>This should somehow end up calling some function in Host called</p>

<pre><code>handleBlahBlah(int x1, int y1, int x2, int y2){
  //do some more sweet stuff
}
</code></pre>

<p>Host is a C program, and does not need to support multiple instances.</p>

<p>An example of this is Amarok music player. With Amarok running and playing, you can type "amarok --pause" and it will pause the music.</p>

<p>I need to be able to do this in Linux or Windows. Preferably Linux.</p>

<p>What is the cleanest way to implement this?</p>

So, I may be missing the point here, but by deafult a C program's main function takes two arguments; argc, a count of the number of arguments (at least one), and argv (or arg vector), the argument list.  You could just parse through the arguments and call the correct method.
For example:
```
```
int main(int argc, *argv[])
 {
     /*loop through each argument and take action*/
      while (--argc > 0)
      {
           printf(%s%s, *++argv, (argc > 1) ? " " : "");
      }
 }
```
```
would print all of the arguments to screen.  I am no C guru, so I hope I haven't made any mistakes.
EDIT:  Ok, he was after something else, but it wasn't really clear before the question was edited.  Don't have to jump on my rep...