I start gpsd to source it's input from a pair of tcp ports as:
/usr/local/sbin/gpsd -b -D1 -F /tmp/gpsd.sock tcp://localhost:46001 tcp://localhost:46002
All works fine until/unless one of the applications that serve data on ports 46001 or 46002 die.
When the application that provides the tcp port dies, gpsd dies as well.
The only thing in the gpsd.log that seems relevant is:
gpsd:ERROR: select: Bad file descriptor
I'm using gpsd in a way that relies on it being a robust daemon, capable of recovering from unclean disconnects or similar events.
I haven't looked at the gpsd source code yet.
Is there anything wrong with the way that I'm starting gpsd?