title: Exit child process without loosing data
body: <p>I had developed 2 C# WinForms application (2 different projects compiling to 2 different exes, App2 isn't having any UI, its simply having an icon in <strong>notification tray</strong>).</p>
  
  <p><strong>App1</strong> keeps working and at sometime when needed creates <strong>App2</strong> using following code,</p>
  
  <pre><code>ProcessStartInfo info = new ProcessStartInfo(applicationName);
  Process.Start(info);
  </code></pre>
  
  <p>In App2's <strong>main</strong> function, I simply use <code>Application.Run(form1);</code></p>
  
  <p>Now, Sometime later I wish to ask that new process i.e. App2 to save all data and exit properly, how can I achieve this? I tried using,</p>
  
  <pre><code>Process.CloseMainWindow();
  </code></pre>
  
  <p>but it doesn't seems to work, because <strong><em>App2</strong> don't have any <strong>User interface</em></strong>. Decisions when to start and end App2 are taken in App1 itself.</p>
  
  <p>Note: I don't wanna use <code>Process.Kill()</code> though it works, but it closes application abruptly. </p>