tty layer and lbolt sleeps

Mike Durian durian at boogie.com
Wed Sep 17 09:56:49 PDT 2003


On Wednesday 17 September 2003 12:55 am, Terry Lambert wrote:
>
> You need your process to become a process group leader, and then
> you need the serial port you are interested in to become the
> controlling tty for your process.

I thought daemon(3) and TIOCSCTTY would do the trick, however
after a few tests, I still see the timing problems.

This whole process seems like a lot of work just to get decent
responsiveness from a serial port.  After all, I don't really
want to change the controlling terminal.  Can anyone explain the
rational behind the ttybg1 and ttybg2 sleeps in the tty.c code?
Are they really necessary?  What sort of horrible things would
happen if I removed those clauses?  If I am reading things
correctly, they've been in the tty.c source code since the
initial check-in.

Or maybe I'm on a wild goose chase here.  Maybe my read and drain
delays which seem to be correlated to HZ are really caused by
something else.  An lbolt sleep just seems like a likely cause to me.

mike




More information about the freebsd-hackers mailing list