I was debugging on a Single Board Computer, and I figured out that I never closed the ttyUSB in my program. Now the program will not get past the open() function. How can I manually close the line, or force it open? I would prefer not to shutdown the computer, and the USB device must remain in the SBC.
The specific line that I am having trouble with is:
gpso = open(GPSDEVICE, O_RDWR | O_NOCTTY); //gps device is the directory name of the device (ttyUSB0)
At process termination the kernel automatically closes all filehandles.
If the devices is still opened it means that the process is still running. Kill it.