X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=eightsync%2Fagenda.scm;h=b26d93b6bdebe328981474e88a3d40f1dd901fef;hb=5686386b450ecf87beeea737b0d1a44818d37e4a;hp=2b46324bfe7a30f2c94af2281c28906374d585f6;hpb=9b79348068515e044d264b77c8f7e3b7e0253283;p=8sync.git diff --git a/eightsync/agenda.scm b/eightsync/agenda.scm index 2b46324..b26d93b 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 (pk 'rest-args 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)