title: End a background process by executing it again in another console, how can it be done?
body: <p>I have a program in C that is required to run in the background. It mimics the smartfolder that you can find on OSX.</p>
  
  <p>I have been asked to <strike>kill</strike> end it by writing it's execution command a second time in a console. </p>
  
  <p>I thought about saving the pid and using 2nd program to watch for the input but I did not find a way to send the input to a background process. </p>
  
  <p>I've tried using pipe and the background program was reading from it but the inputs were not going to it.</p>
  
  <p>Could someone tell me if it's possible at all and if this is the right way to do it ? Would this work with a daemon process too ?</p>