Pythonã®ãåå¼·ãå ¼ãã¦ãå æ¥ Cã§æ¸ãã Cè¨èªã§preforkåã®ãã¼ã¢ã³ãæ¸ã(3): ãã¼ã¢ã³å - Sleepless geek in Seattle ãPythonã«ç§»æ¤ãã¦ã¿ãã æ¡ä»¶åå²ãã«ã¼ããé¢æ°å®ç¾©ããã¡ã¤ã«æä½ãforkãwaitãã·ã°ãã«ãã³ãã©ãé£æ³é åããªã©ãªã©çãããã°ã©ã ã ãã©ããããããªè¦ç´ ãå ¥ã£ã¦ããã®ã§ãªããªãè¯ããµã³ãã«ã«ãªã£ãã #!/usr/bin/env python import os import sys import signal import time MAX_CHILDREN=16 PID_FILE='/var/run/my_prefork_daemon.pid' hash_children={} def main(): #ãã¼ã¢ã³å daemonize() #ããã»ã¹IDãæ¸ãã¦ãã write_pid() #ã·ã°ãã«ãã³ãã©
{{#tags}}- {{label}}
{{/tags}}