aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-location-gps-raw.c
diff options
context:
space:
mode:
authorBrian, Sam <Samuel.Brian@digi.com>2018-06-22 01:50:20 +0000
committerAleksander Morgado <aleksander@aleksander.es>2018-06-22 10:54:01 +0200
commitbb9e9a92a325b955ee839565618f13a2a0bf4cf0 (patch)
treed2edea62f3d7d901c627a219d389d42dc2f02b9d /libmm-glib/mm-location-gps-raw.c
parentefd57e8d5b2e0ced4ab857d72af0e86ae0bbf3f8 (diff)
port-serial: don't close tty file descriptor twice
After the tty is opened, the fd is passed off to a GIOChannel which manages it. When the serial port is closed with _close_internal(), g_io_channel_shutdown() is called which then calls g_io_unix_close() which in turn close()s the fd. _close_internal() performs a second explicit close() after the g_io_channel_shutdown() which *in the best case scenario* will fail with EBADF. This is a race condition that can result in other file descriptors being closed. This change avoids double closing the serial port fd -- the shutdown() call is removed in favour of the explicit close().
Diffstat (limited to 'libmm-glib/mm-location-gps-raw.c')
0 files changed, 0 insertions, 0 deletions