Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-10-01 Thread Jörg F . Wittenberger
Thanks Mario. I just checked. The Scheduler code I'm using does not have this bug. On Sep 29 2011, Mario Domenech Goulart wrote: Hi Jörg, On 29 Sep 2011 13:11:49 +0200 Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Recently (maybe 4.7.3 or .4) I'm seeing missbehavior from

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Jörg F . Wittenberger
On Sep 29 2011, Alan Post wrote: Below is a test case for a problem I'm seeing in some multi-process code I'm writing. I'm getting the error: Error: (file-read) cannot read from file - Interrupted system call There are two ways to fix that: either make the posix unit thread safe (recall my

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Alan Post
On Wed, Sep 28, 2011 at 05:29:46PM -0601, Alan Post wrote: Below is a test case for a problem I'm seeing in some multi-process code I'm writing. I'm getting the error: Error: (file-read) cannot read from file - Interrupted system call because a signal handler is going off while my main

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Alan Post
On Thu, Sep 29, 2011 at 01:11:49PM +0200, Jörg F. Wittenberger wrote: On Sep 29 2011, Alan Post wrote: Below is a test case for a problem I'm seeing in some multi-process code I'm writing. I'm getting the error: Error: (file-read) cannot read from file - Interrupted system call There

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Mario Domenech Goulart
Hi Jörg, On 29 Sep 2011 13:11:49 +0200 Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Recently (maybe 4.7.3 or .4) I'm seeing missbehavior from formerly well working code. I can't say that's chickens fault but neither I can say it's not. 4.7.3 has a bug that may affect your

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Jörg F . Wittenberger
On Sep 29 2011, Alan Post wrote: On Thu, Sep 29, 2011 at 01:11:49PM +0200, Jörg F. Wittenberger wrote: On Sep 29 2011, Alan Post wrote: Below is a test case for a problem I'm seeing in some multi-process code I'm writing. I'm getting the error: Error: (file-read) cannot read from file -

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Alan Post
On Thu, Sep 29, 2011 at 03:26:22PM +0200, Jörg F. Wittenberger wrote: Attempt work around: defer the signal even more: until next schedule time. I'm not yet satisfied with that solution. (But at least it allows me to run arbitrary code in the signal handler.) (I intended so far to try

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Alan Post
On Thu, Sep 29, 2011 at 03:26:22PM +0200, Jörg F. Wittenberger wrote: Signal handlers as they are in chicken might be problematic. I can't find the message, but I recall a reply these days, which informed me that it's true that chicken interrupt handlers are in fact in a restricted dialect of

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Jörg F . Wittenberger
On Sep 29 2011, Alan Post wrote: On Thu, Sep 29, 2011 at 03:26:22PM +0200, Jörg F. Wittenberger wrote: Signal handlers as they are in chicken might be problematic. I can't find the message, but I recall a reply these days, which informed me that it's true that chicken interrupt handlers are in

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Jörg F . Wittenberger
On Sep 29 2011, Alan Post wrote: Let me try a demonstration showing just the main thread: (define (restart-read fd buf isize) ; call read(2), on the self-pipe, which blocks (let ((r (file-read fd buf isize))) (if (= -1 r) ; ah, a signal was delivered. In Chicken, the signal

Re: [Chicken-users] EINTR with self-pipe signal trampoline

2011-09-29 Thread Jörg F . Wittenberger
On Sep 29 2011, Jörg F. Wittenberger wrote: On Sep 29 2011, Alan Post wrote: Let me try a demonstration showing just the main thread: (define (restart-read fd buf isize) ; call read(2), on the self-pipe, which blocks (let ((r (file-read fd buf isize))) (if (= -1 r) ; ah, a

[Chicken-users] EINTR with self-pipe signal trampoline

2011-09-28 Thread Alan Post
Below is a test case for a problem I'm seeing in some multi-process code I'm writing. I'm getting the error: Error: (file-read) cannot read from file - Interrupted system call because a signal handler is going off while my main thread is in an iowait state. In C, I have always handled this