[SOLVED] setNativeLocks failed: Resource temporarily unavailable
-
Working on some QSerialPort code under OS X. I was able to open the port once but after I stopped program in the debugger I can no longer open the port. It keeps getting stuck trying to open it and gives me endless error messages "setNativeLocks failed: Resource temporarily unavailable" even after I reboot my Mac. I am able to open the port through various terminal programs but Qt is being stubborn.
-
Hi,
AFAIK QSerialPort uses a lock file to prevent concurrent use of the serial port on unix systems. You might have that file still there thus it blocks any further operation
-
Okay, I figured it out. There is a file in /var/lock whose name contains the /dev entry for the device. Deleted that file and I'm back in business. I guess the device wasn't properly closed after quitting debugging in the middle.