gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] tests hanging on netsbd-6 i386


From: Eric S. Raymond
Subject: Re: [gpsd-dev] tests hanging on netsbd-6 i386
Date: Fri, 30 Jan 2015 12:21:14 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

Greg Troxel <address@hidden>:
> 
> It looks like 301 is ok and 302 is hanging.
> 
> -rw-r--r--  1 gdt  ir    13249 Jan 30 10:57 CHECK.release-3.11-301-ga83ecfd
> -rw-r--r--  1 gdt  ir     4774 Jan 30 10:53 CHECK.release-3.11-302-g646f855
> 
> Also, 301 prints out
> 
> gpsd:SHOUT: tty params optimized for min length 16 of textual packets
> 
> and 302 does not.

I can't match these hashes in git log.  What are the timestamps on those 
commits?

> Are raw tty devices on linux always non-blocking?  I can see how code
> that does
> 
>    select
>    if (readble(fd)
>       read a byte from fd
> 
> would work ok with either nonblocking io or not, but if the device isn't
> set in nonblocking mode then
> 
>    select
>    if (readble(fd)
>       read 16 bytes from fd
> 
> should just pend in the read.

At device open time the code clears ICANON and does this:

        session->ttyset.c_cc[VMIN] = 1;

Terminal I/O remains blocking but returns as soon as one character is 
available. It looks nonblocking from the point of view of the 
top-level code because tty reads are always guarded by the main select - 
no tty read is ever called unless we already know there is input waiting.

What is new is that each driver now declares a minimum packet length.  When
switching to a driver, the line discipline changes to this:

        session->ttyset.c_cc[VMIN] = minlength;
        session->ttyset.c_cc[VTIME] = 1;

which means "return when you either have minlength characters waiting for
read or at least one character and 0.1sec has elapsed since the last
character read."

It may actually suffice to declare a timeout with no length limit.  But
let's solve the present problem first.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]