Commits

Ian Bicking  committed 20a8e90 Merge

Merged in mitchellrj/pastescript (pull request #2)

Try to stop a daemonized process by sending SIGINT before SIGTERM

  • Participants
  • Parent commits 4905ffb, eab9018

Comments (0)

Files changed (1)

File paste/script/serve.py

             if not live_pidfile(pid_file):
                 break
             import signal
+            os.kill(pid, signal.SIGINT)
+            time.sleep(1)
+        for j in range(10):
+            if not live_pidfile(pid_file):
+                break
+            import signal
             os.kill(pid, signal.SIGTERM)
             time.sleep(1)
         else: