In the function gypsy_client_start() in the following code: if (priv->device_path[0] == '/') { priv->fd = open (priv->device_path, O_RDONLY | O_NOCTTY | O_NONBLOCK); if (priv->fd != -1 && isatty (priv->fd)) { /* Reopen read-write for TTY devices, * we'll be detecting whether it's garmin later */ priv->type = GYPSY_DEVICE_TYPE_SERIAL; close (priv->fd); priv->fd = open (priv->device_path, O_RDWR | O_NOCTTY | O_NONBLOCK); } else { priv->type = GYPSY_DEVICE_TYPE_FIFO; } priv->fd = open (priv->device_path, O_RDWR | O_NOCTTY | O_NONBLOCK); if (priv->fd == -1) { g_warning ("Error opening device %s: %s", priv->device_path, g_strerror (errno)); g_set_error (error, GYPSY_ERROR, errno, g_strerror (errno)); return FALSE; } last call to open() method is not needed.
Has been fixed commit 754ac3bdf53d7fc3f9383f0e009c71f2b2e26381 Author: iain <iain@linux.intel.com> Date: Tue Dec 6 13:00:31 2011 +0000 Only open TTY devices once TTY devices were accidentally being opened twice but only closed once. This meant that when a device file was removed, but then replaced, a file descrip this dead file descriptor was being returned when Gypsy attempted to open th new device, causing I/O errors when trying to read from it. Which in turn caused some lovely CPU pegging as Gypsy would just enter a busy loop constan trying to read from the dead descriptor. In short, everyone's a winner!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.