gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] gpsd: skip tcdrain() when closing in readonly mode


From: Gary E. Miller
Subject: Re: [gpsd-dev] gpsd: skip tcdrain() when closing in readonly mode
Date: Wed, 2 May 2018 09:06:21 -0700

Yo Jean!

Sorry for the delay.  I'll look at it today.

On Wed, 2 May 2018 15:05:54 +0000
Jean Pierre TOSONI <address@hidden> wrote:

> Hello List,
> 
> I submitted the patch below about two months ago. Any chance it gets
> through, or at least gets some comments back if something is wrong?
> 
> Best regards,
> 
> Jean-Pierre Tosoni
> 
> > -----Message d'origine-----
> > De : gpsd-dev
> > [mailto:address@hidden De la part
> > de Jean Pierre TOSONI Envoyé : lundi 12 mars 2018 10:52
> > À : address@hidden
> > Objet : [gpsd-dev] gpsd: skip tcdrain() when closing in readonly
> > mode
> > 
> > The Quectel EC25 device used with the Linux 3.10.20 usb/option
> > driver makes gpsd hang when it closes the serial port after
> > receiving a SIGTERM.
> > 
> > Hanging is caused by the call to tcdrain(), which happens even when
> > gpsd is in read-only mode (-b argument).
> > 
> > In this mode, since nothing is ever written to the serial port, the
> > tcdrain call is not needed. Skip it.
> > 
> > --- a/serial.c
> > +++ b/serial.c
> > @@ -727,7 +727,8 @@ void gpsd_close(struct gps_device_t *ses
> >  #ifdef TIOCNXCL
> >         (void)ioctl(session->gpsdata.gps_fd, (unsigned
> > long)TIOCNXCL); #endif /* TIOCNXCL */
> > -       (void)tcdrain(session->gpsdata.gps_fd);
> > +       if (!session->context->readonly)
> > +               (void)tcdrain(session->gpsdata.gps_fd);
> >         if (isatty(session->gpsdata.gps_fd) != 0) {
> >             /* force hangup on close on systems that don't do HUPCL
> > properly */ (void)cfsetispeed(&session->ttyset, (speed_t) B0);
> > --
> > quilt 0.48  
> 
> 
> 




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgp15ERom1IJV.pgp
Description: OpenPGP digital signature


reply via email to

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