         delete @workerProcess[name]
 
     @child.on 'close', () =>
-      console.log "[PROCESSES][#{name}] did close." if verbose
-      @emit "close",@child.pid,name
-      onExit @child.pid,name
+      console.log "[PROCESSES][#{name}] did close."  if verbose
+      @emit "close", @child.pid, name
+      onExit @child.pid, name
       if @disableRestart is yes
-        console.log "[PROCESSES][#{name}] restart is disabled because of force mode." if verbose
+        console.log "[PROCESSES][#{name}] restart is disabled because of force mode."  if verbose
         @disableRestart = no
         return
 
       if restart is yes
-        restartTimeout = 1 unless restartTimeout
-        setTimeout =>
-          @run options
-        ,restartTimeout
-        console.log "[PROCESSES][#{name}] restarting the process in #{restartTimeout} msecs." if verbose
-
-    @child.on 'message',(msg) =>
+        restartTimeout = 1  unless restartTimeout
+        setTimeout (=> @run options), restartTimeout
+        console.log "[PROCESSES][#{name}] restarting the process in #{restartTimeout} msecs."  if verbose
+
+    @child.on 'message', (msg) =>
       onMessage msg if "function" is typeof onMessage
       if msg['process-monitor']
         delete msg['process-monitor']

          @workerProcess[name].startReporter "ack"
          @workerProcess[name].stopReporter "add"
          # Update kontrold worker information with our newly created pid.
          setTimeout =>
            @workerProcess[name].fetchWorkerExchange (workerExchange) =>
              @workerProcess[name].worker.message.command = "update"
              @workerProcess[name].worker.status = 0
              @workerProcess[name].worker.pid = @list[name].pid
              @workerProcess[name].worker.timestamp = @getDate()
              workerExchange.publish "input.worker", {worker: @workerProcess[name].worker},
                appId: "#{@workerProcess[name].worker.uuid}"
          , 5000

    #############
    ### Kill  ###

    @workerProcess[name].on 'permissionToRun', =>
      # Don't create a new fork if we start it again (i.e after a stop)
      unless @list[name]?.name is name
          console.log "[PROCESSES][#{name}] received 'add' message from Kontrold. starting child_process."  if verbose
          @child = @startProcess options
          @populateChildObject options, @child
          #############
