summaryrefslogtreecommitdiff
path: root/daemon.py
blob: a5179780ef02a63cda1ee028b30315ae0e68e247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python3
# coding=utf-8

if __name__ == '__main__':
    import os
    import logging
    logging.basicConfig(filename=os.environ.get('CODEQ_SERVER_LOG') or 'codeq-server.log', level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s')

    import signal
    signal.signal(signal.SIGCHLD, signal.SIG_IGN)

    import multiprocessing
    multiprocessing.set_start_method('forkserver')

    import server
    server.socket.serve_forever()