bug-guile
[Top][All Lists]
Advanced

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

Re: signal handling different in 1.8.3 than 1.8.1?


From: Ludovic Courtès
Subject: Re: signal handling different in 1.8.3 than 1.8.1?
Date: Tue, 03 Jun 2008 17:07:02 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Hi,

Gregory Marton <address@hidden> writes:

> Now that I've upgraded to 1.8.3 from 1.8.1, some old test cases are
> failing.  In particular:

According to `NEWS', there were no signal-related changes.

> (define (ensure body-lambda ensuring-lambda)
>    (dynamic-wind
>        (lambda () #t)
>        body-lambda
>        ensuring-lambda))
>
> (define (with-sigaction signum handler flags lamb)
>      (let ((old-sigaction (sigaction signum)))
>        (if flags (sigaction signum handler flags) (sigaction signum handler))
>        (ensure
>         lamb
>         (lambda ()
>           (sigaction signum (car old-sigaction) (cdr old-sigaction))))))

Signal handlers are invoked asynchronously as system asyncs, and system
asyncs are run whenever `SCM_TICK' is encountered in the C code.

There doesn't seem to be any Scheme procedure to force the execution of
system asyncs, but maybe you can try invoking LAMB above in
`call-with-unblocked-asyncs' and/or adding a `(sleep 0)' right before it
to force the execution of pending system asyncs.

Let us know if it helps.

Thanks,
Ludovic.





reply via email to

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