title: how to restart the Linux Daemon if the daemon process got killed by the user
body: <p>I have written a Linux Daemon Process in c , now my issue is that
  if the user kills the Daemon , the Daemon  must be restarted automatically , how can i implement it inside the Daemon .</p>
  <p>Like :: on shutdown event received &gt; restart the Daemon</p>
  <blockquote>
  <p>Example Scenario</p>
  <p>A Daemon is long-lived. Often, a daemon is created at system startup
  and runs until the system is shut down , Lets say for eg: a daemon
  called XXX  , doing important routines like the functions watching for
  specific log files , and if found alert the admin in High security
  apps , if this daemon got killed , it need to be restarted
  automatically</p>
  </blockquote>