This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Signal handling in Win32 GUI programs


I've added a thread doing 'for (;;) pause();', but unfortunately that doesn't seem to do the trick. Do I need to go into Cygwin internals and wait directly on the Win32 event(s) used for signals?

sigwait() will probably work better than pause.

That indeed works, thank you very much! I didn't know that function, very handy. With that and threads, signal handlers with all their vagaries aren't really needed anymore, are they?


And speaking of threads, does it make a difference whether one uses Pthreads or Win32 threads? I mean apart from portability and the small overhead Pthreads presumably incur.

MinTTY's got three such little helper threads hanging about now, doing waitpid() on the child process, read() on the child pty, and the abovementioned sigwait(). Would there be any point in trying to consolidate them into a single sigwait() process, using SIGCHLD and asynchronous reads?

Andy


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]