Re: Signal problem

2010-01-11 Thread Tim McClarren
Marc Lehmann wrote: On Sun, Jan 10, 2010 at 09:14:04AM -0800, Tim McClarren wrote: Not sure who claimed you are an idiot, but you don't understand SIGSEGV and how it works. I think I do, in fact. I use the same handler for the other "abort" signals. FPE, BUS, etc.

Re: Signal problem

2010-01-10 Thread Tim McClarren
On Jan 10, 2010, at 6:44 AM, Marc Lehmann wrote: On Sat, Jan 09, 2010 at 10:03:03AM -0800, Tim McClarren > wrote: of ev_signal was to attempt to deliver asynchronous signals synchronously. Exactly - so what do you expect? I'd expect libev to not catch it, I think... if the beh

Re: Signal problem

2010-01-09 Thread Tim McClarren
On 1/9/10 1:30 AM, Marc Lehmann wrote: On Fri, Jan 08, 2010 at 10:55:43AM -0800, Tim McClarren wrote: So what do you expect? There is no portable way to continue from segfaults, and segfaults are asynchronous. Yes. I was under the impression from the documentation that the purpose of

Re: Signal problem

2010-01-08 Thread Tim McClarren
Marc Lehmann wrote: On Thu, Jan 07, 2010 at 10:13:42AM -0800, Tim McClarren wrote: SEGV does not get handled in a way that I would expect, so I wrote a little test for it. So what do you expect? There is no portable way to continue from segfaults, and segfaults are asynchronous. Yes. I

Re: Signal problem

2010-01-07 Thread Tim McClarren
Mea culpa. In trying to create a minimal reproduction case, I botched. Here's a better case: #include #include void catchf(struct ev_loop* loop, ev_signal* w, int r) { ev_unloop(ev_default_loop(0), EVUNLOOP_ALL); printf("caught SEGV\n"); } void laterf(struct ev_loop* loop, ev_perio

Signal problem

2010-01-07 Thread Tim McClarren
I currently have a pretty simple single-threaded code base. I'm using libev with a variety of watchers -- several io watchers, a few asyncs, and a few periodics. I am also using signal watchers. SEGV does not get handled in a way that I would expect, so I wrote a little test for it. I'm pro

Re: Using libev in a GUI

2010-01-06 Thread Tim McClarren
Marc Lehmann wrote: On Tue, Jan 05, 2010 at 04:27:33PM -0800, John Wright wrote: I need to embed a very simple server in a Mac carbon bundle that will be loaded when a GUI starts up. It can't hang the main thread as the GUI needs to start responding to user interaction. So I can't start an

Re: Using libev in a GUI

2010-01-05 Thread Tim McClarren
I have had no problems using loops inside background threads. Just create a new loop in that thread an ev_loop on it. Using ev_async's to communicate between loops that are being pumped in different threads seems to work nicely. Just use ev_loop_new to create a new loop, and then ev_loop on