guile-rpc-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-rpc-bugs] RPC server loop, `select' -- system call is interru


From: Ludovic Courtès
Subject: Re: [Guile-rpc-bugs] RPC server loop, `select' -- system call is interrupted
Date: Sun, 11 May 2014 18:21:22 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Artyom Poptsov <address@hidden> skribis:

> ERROR: In procedure select:
> ERROR: In procedure select: Interrupted system call
>
> The program runs on Gentoo GNU/Linux (Base System release 2.2), with GNU
> Guile 2.0.9 and GNU Guile-RPC (commit 17043e8).

[...]

> Currently I use a workaround in my program to restart RPC server when
> the error occurs.  The reason why I ran into problems with signals is
> still under investigation.

Yes, in Guile 2.0 <= 2.0.9, there was a problem whereby EINTR return
values were exposed to the user, whereas the intent has always been for
Guile to restart syscalls upon EINTR.

I worked around it in dmd with:

--8<---------------cut here---------------start------------->8---
(define (EINTR-safe proc)
  "Wrap PROC so that if a 'system-error' exception with EINTR is raised (that
was possible up to Guile 2.0.9 included) the call to PROC is restarted."
  (lambda args
    (let loop ()
      (catch 'system-error
        (lambda ()
          (apply proc args))
        (lambda args
          (if (= EINTR (system-error-errno args))
              (loop)
              (apply throw args)))))))
--8<---------------cut here---------------end--------------->8---

Commit de585b3 does something similar.

Can you check whether it works for you?

> [0] https://github.com/artyom-poptsov/awget

“unfortunately written in Scheme instead of Lua.”?!  :-)

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]