title: Why does my daemon only run one instance?
body: <p>I'm currently using the <code>skeleton</code> in <code>/etc/init.d</code> to start a daemon when my computer boots. I need the daemon to run three instances. In my skeleton, I have changed the code in the start function to:</p>
  
  <pre><code>cd dir1 ; start-stop-daemon -b --start --quiet --pidfile ${PIDFILE}1 --exec $DAEMON -- \
                    $DAEMON_ARGS \
                    || return 2 ;
  cd dir2 ; start-stop-daemon -b --start --quiet --pidfile ${PIDFILE}2 --exec $DAEMON -- \
                    $DAEMON_ARGS \
                    || return 2 ;
  cd dir3 ; start-stop-daemon -b --start --quiet --pidfile ${PIDFILE}3 --exec $DAEMON -- \
                    $DAEMON_ARGS \
                    || return 2 ;
  </code></pre>
  
  <p>Because my DAEMON variable points to a binary that I control, I know without a shadow of a doubt that each instance at least runs for a bit. But when the system comes up finally, I can only ever see one instance of the process running. I also looked at the man page of start-stop-daemon and it is not supposed to kill an already running instance if --pidfile is specified. I am also using -b, and I have tested my daemon script where I execute it directly with <code>run.sh start</code>. After this, I can see three processes running as I expect.</p>
  
  <p>How do I get all three instances to stay?</p>