diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2017-06-19 17:39:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-06-22 10:59:07 +0200 |
commit | 1071f781d97509347144754b3248581cf7c6c1d5 (patch) | |
tree | 59565eacafc47841647596a5cf84c4e0311af39a /gnu | |
parent | 5df1395a8d4bb83e002e1aab5d930edd2b49d27e (diff) | |
download | patches-1071f781d97509347144754b3248581cf7c6c1d5.tar patches-1071f781d97509347144754b3248581cf7c6c1d5.tar.gz |
daemon: '--listen' can be passed several times, can specify TCP endpoints.
* nix/nix-daemon/guix-daemon.cc (DEFAULT_GUIX_PORT): New macro.
(listen_options): New variable.
(parse_opt): Push back '--listen' options to LISTEN_OPTIONS.
(open_unix_domain_socket, open_inet_socket)
(listening_sockets): New functions.
(main): Use it. Pass SOCKETS to 'run'.
* nix/nix-daemon/nix-daemon.cc (matchUser): Remove.
(SD_LISTEN_FDS_START): Remove.
(acceptConnection): New function.
(daemonLoop): Rewrite to take a vector of file descriptors, to select(2)
on them, and to call 'acceptConnection'.
(run): Change to take a vector of file descriptors.
* tests/guix-daemon.sh: Add test.
Diffstat (limited to 'gnu')
0 files changed, 0 insertions, 0 deletions