X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=eightsync%2Fagenda.scm;h=adbd0c688f402def34b35cf01ef7db7ace697cee;hb=77ac93255544d74b0217e75de4f8a23361397f28;hp=2b46324bfe7a30f2c94af2281c28906374d585f6;hpb=9b79348068515e044d264b77c8f7e3b7e0253283;p=8sync.git diff --git a/eightsync/agenda.scm b/eightsync/agenda.scm index 2b46324..adbd0c6 100644 --- a/eightsync/agenda.scm +++ b/eightsync/agenda.scm @@ -554,10 +554,17 @@ return the wrong thing via (8sync) and trip themselves up." ;; TODO: support usecond wait time too (match (get-wait-time) ((sec . usec) - (select (hash-keys (agenda-read-port-map agenda)) - (hash-keys (agenda-write-port-map agenda)) - (hash-keys (agenda-except-port-map agenda)) - sec usec)))) + (catch 'system-error + (lambda () + (select (hash-keys (agenda-read-port-map agenda)) + (hash-keys (agenda-write-port-map agenda)) + (hash-keys (agenda-except-port-map agenda)) + sec usec)) + (lambda (key . rest-args) + (match rest-args + ((_ _ _ (EINTR)) + '(() () ())) + (_ (error "Unhandled error in select!" key rest-args)))))))) (define (get-procs-to-run) (define (ports->procs ports port-map) (lambda (initial-procs)