diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-10 22:10:26 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-10 22:10:26 +0200 |
commit | f5afc242a0e463377e691b071d7d0c4c07adbd60 (patch) | |
tree | 8ba4ff3e2b08539b1c4499240142ef2004a105e2 | |
parent | m + load configuration script (diff) | |
download | nightshift-f5afc242a0e463377e691b071d7d0c4c07adbd60.tar.gz nightshift-f5afc242a0e463377e691b071d7d0c4c07adbd60.tar.bz2 nightshift-f5afc242a0e463377e691b071d7d0c4c07adbd60.tar.xz |
make the size of the backlog configurable
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rwxr-xr-x | src/nightshift.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nightshift.py b/src/nightshift.py index 3111a40..b9b8e7a 100755 --- a/src/nightshift.py +++ b/src/nightshift.py @@ -67,6 +67,11 @@ def setproctitle(title): setproctitle(sys.argv[0]) +backlog = 5 +''' +:int The size of the server socket's backlog +''' + red_args = None ''' :list<str>? Raw arguments passed to redshift @@ -390,7 +395,7 @@ def do_daemon(): pass # The fill does (probably) not exist sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.bind(socket_path) - sock.listen(5) + sock.listen(backlog) # Perform daemon logic run_as_daemon(sock) @@ -459,7 +464,7 @@ def create_daemon(): pass # The fill does (probably) not exist sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.bind(socket_path) - sock.listen(5) + sock.listen(backlog) # Send signal with os.fdopen(w_end, 'wb') as file: |