From 8446dc5a360e3a13fecea870f86efdbd893e3905 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 7 Feb 2018 22:31:48 +0100 Subject: ssh: Work around 'select' bug in Guile. Fixes . * guix/ssh.scm (remote-daemon-channel)[redirect]: Define 'select*' and use it. --- guix/ssh.scm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'guix') diff --git a/guix/ssh.scm b/guix/ssh.scm index 5e442024bc..9e90216a2d 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -108,9 +108,18 @@ Throw an error on failure." (use-modules (ice-9 match) (rnrs io ports) (rnrs bytevectors)) - (let ((sock (socket AF_UNIX SOCK_STREAM 0)) - (stdin (current-input-port)) - (stdout (current-output-port))) + (let ((sock (socket AF_UNIX SOCK_STREAM 0)) + (stdin (current-input-port)) + (stdout (current-output-port)) + (select* (lambda (read write except) + ;; This is a workaround for + ;; in Guile < 2.2.4: + ;; since 'select' sometimes returns non-empty sets for + ;; no good reason, call 'select' a second time with a + ;; zero timeout to filter out incorrect replies. + (match (select read write except) + ((read write except) + (select read write except 0)))))) (setvbuf stdout _IONBF) ;; Use buffered ports so that 'get-bytevector-some' returns up to the @@ -121,7 +130,7 @@ Throw an error on failure." (connect sock AF_UNIX ,socket-name) (let loop () - (match (select (list stdin sock) '() '()) + (match (select* (list stdin sock) '() '()) ((reads () ()) (when (memq stdin reads) (match (get-bytevector-some stdin) -- cgit v1.2.3 From 0a574d7bf7009e9fcd28fbaaad2842dc287fa29d Mon Sep 17 00:00:00 2001 From: Björn Höfling Date: Thu, 1 Feb 2018 16:09:03 +0100 Subject: licenses: Add W3C license. * gnu/license.scm (w3c): New variable. --- guix/licenses.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'guix') diff --git a/guix/licenses.scm b/guix/licenses.scm index 269d97c723..700fa7f03a 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -87,6 +87,7 @@ tcl/tk unlicense vim + w3c x11 x11-style zpl2.1 zlib @@ -578,6 +579,11 @@ at URI, which may be a file:// URI pointing the package's tree." "https://unlicense.org/" "https://www.gnu.org/licenses/license-list.html#Unlicense")) +(define w3c + (license "W3C Software Notice and License" + "https://directory.fsf.org/wiki/License:W3C_31Dec2002" + "https://www.gnu.org/licenses/license-list.en.html#W3C")) + (define wtfpl2 (license "WTFPL 2" "http://www.wtfpl.net" -- cgit v1.2.3