summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-02 02:52:19 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-02 02:52:19 -0500
commitf2ba61245f84a8dfada18953fda5cd960eaf9423 (patch)
tree48ac542204777540c4e99606d86daa50f6f44124 /serial.c
parente9b32d194285e307630f6e3cf64587976acde8bb (diff)
downloadgpsd-f2ba61245f84a8dfada18953fda5cd960eaf9423.tar.gz
Open ttys with CLOCAL, following a suggestion by Hal Murray.
Also, zero in on shorter delays in the regression tests. All regression tests pass.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/serial.c b/serial.c
index 96dfdd7b..dd2c0512 100644
--- a/serial.c
+++ b/serial.c
@@ -459,13 +459,13 @@ int gpsd_serial_open(struct gps_device_t *session)
{
if ((session->gpsdata.gps_fd =
open(session->gpsdata.dev.path,
- (int)(mode | O_NOCTTY))) == -1) {
+ (int)(mode | CLOCAL | O_NOCTTY))) == -1) {
gpsd_report(&session->context->errout, LOG_ERROR,
"device open failed: %s - retrying read-only\n",
strerror(errno));
if ((session->gpsdata.gps_fd =
open(session->gpsdata.dev.path,
- O_RDONLY | O_NOCTTY)) == -1) {
+ O_RDONLY | CLOCAL | O_NOCTTY)) == -1) {
gpsd_report(&session->context->errout, LOG_ERROR,
"read-only device open failed: %s\n",
strerror(errno));