title: Integrating Linux soft + hard reboot
body: <p>I read <a href="http://major.io/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/" rel="nofollow noreferrer">here</a>  that using below command we can simulate hard reboot on Linux system:</p>
  <pre><code>echo 1 &gt; /proc/sys/kernel/sysrq 
  echo b &gt; /proc/sysrq-trigger
  </code></pre>
  <p>But I wanted to add some soft reboot feature before the above command is executed such as <code>SIGTERM</code>, <code>SIGKILL</code> etc which are issued on soft reboot. Can any one suggest how can i do it using bash or C/C++. Also what are steps followed while doing soft reboot on Linux system?</p>