Send messages to program through command line | 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 **while it's running**. This means it has to somehow send its other process data and then quit. For example, I need to be able to do this:



```
./Host --blahblah 3 6 3 5

```

This should somehow end up calling some function in Host called



```
handleBlahBlah(int x1, int y1, int x2, int y2){
  //do some more sweet stuff
}

```

Host is a C program, and does not need to support multiple instances.


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


I need to be able to do this in Linux or Windows. Preferably Linux.


What is the cleanest way to implement this?