Re: RS232 Redirector Program in C using Linux



On 2008-01-21, William Pursell <bill.pursell@xxxxxxxxx> wrote:
On Jan 21, 5:42 am, Steffen <steffen.ku...@xxxxxxxxx> wrote:

I need some help with a c program I am writing.

I can't answer your immediate questions, but I do have a
thought: you don't need to use signals. You might be happier
if you use select/poll/epoll instead. That might simplify the
design and make it easier to track down the error, if it
doesn't eliminate the error completely.

You definitely want to avoid signals if possible. You have to
be very careful about what you're allowed to do in a signal
handler.

Use poll or select. It's a lot simpler. Another option is to
use two threads or processes (IIRC, that's how some serial
programs like kermit used to work back in the days before
poll/select). But poll/select is a lot easier.

--
Grant Edwards grante Yow! I was making donuts
at and now I'm on a bus!
visi.com
.



Relevant Pages

  • Re: RS232 Redirector Program in C using Linux
    ... signals. ... You might be happier if you use ... select/poll/epoll instead. ... understand why my transferred JPEG gets corrupted - on my other test ...
    (comp.os.linux.development.apps)
  • Re: RS232 Redirector Program in C using Linux
    ... I can't answer your immediate questions, ... signals. ... You might be happier if you use ... select/poll/epoll instead. ...
    (comp.os.linux.development.apps)
  • Re: [HACKERS] semaphore usage "port based"?
    ... postgres a bit happier, ... will be apart from the obvious information leak. ... to 'make postgres a bit happier', all that needs to be fixed, from what I can tell, is that cr_cansignalneeds to work for signal 0, but no other signals ... ...
    (freebsd-stable)