title: Call same instance of a program?
body: <p>I am creating a C program that is called from a shell script when a specific event is occurring. The C program gets an argument from the shell script like this:</p>
  
  <pre><code>&gt; ./c-program.bin HELLO
  </code></pre>
  
  <p>Now the C program is running until it recieves a specific character as an argument. The problem is that if a second event occurs, and the C program is now called like this:</p>
  
  <pre><code>./c-program.bin WORLD
  </code></pre>
  
  <p>Then it is a new instance of the program that is started that knows nothing about the string from the first event. What i would like to achieve is something like this:</p>
  
  <pre><code>[EVENT0] ./c-program.bin HELLO
  [EVENT1] ./c-program.bin WORLD
  [EVENT2] ./c-program.bin *
  </code></pre>
  
  <p>c-program output:</p>
  
  <pre><code>HELLO WORLD
  </code></pre>
  
  <p>Any ideas on how to only have one instance of the program? The platform is Linux. The project is in its planning fase therefore, i do not have any specific code so far, i am trying to sort out the different problems first.</p>